我在第二次传递代码时得到 hresult 0x800a01b6 。
当它第一次运行时它运行但是在第二次运行时失败。 IE打开然后程序停止。
Dim pID As String
Dim mesg As String
Dim pw As String
Dim Id As String
Dim ie As Object
Dim l As String
'For Each Id In ListBox2.Items'
For i As Integer = 0 To Me.ListBox2.Items.Count - 1
Id = Me.ListBox2.Items(i).ToString
If Id = "me " Then
Id = "466901"
ElseIf "you" Then
Id = "466942"
End If
ie = CreateObject("InternetExplorer.Application")
ie.Navigate("http://www.webpage.com.au/")
ie.Visible = True
mesg = TextBox1.Text.ToString()
pw = "....."
ie.Document.All("password").Value = pw
ie.Document.All("idpagers").Value = Id
ie.Document.All("message").Value = mesg
ie.Document.All("Send").Click()
pID = ie.Document.All().ToString
'MessageBox.Show(pID)
MessageBox.Show(l & mesg & pw, "Test")'
Next
End Sub