Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted webcompflag = True End Sub Sub webconCompleted() Do While (webcompflag = False) System.Windows.Forms.Application.DoEvents() System.Threading.Thread.Sleep(10) Loop End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim all As HtmlElementCollection = WebBrowser1.Document.All Dim path As String = Application.StartupPath + "\setting\path\path.xml" Dim dSet As New DataSet() Dim sRead As IO.StreamReader Dim dRow As DataRow Dim yahooaouction As New Uri("https://login.bizmanager.yahoo.co.jp/login") Me.WebBrowser1.Navigate(yahooaouction) Call webconCompleted() Dim IDb As HtmlElementCollection = all.GetElementsByName("user_name") Dim PASSb As HtmlElementCollection = all.GetElementsByName("password") Dim btb As HtmlElementCollection = all.GetElementsByName("login_form") sRead = New IO.StreamReader(path, System.Text.Encoding.Default) dSet.ReadXml(sRead) dRow = dSet.Tables("ログイン設定詳細").Rows.Item(1) IDb(0).InnerText = dRow("ID") PASSb(0).InnerText = dRow("パス") btb(0).InvokeMember("submit") sRead.Close() End Sub