ok so i tried the code and it says that IHTMLElementCollection isnt defined so i changed it to HTMLElementColection
after which it said that AutoLogin.WebBrowser20.Document.Body.All("Input")was an html element and couldnt be converted into an element collection.
but i think that if i had a refenrence to IHTMLElementCollection it would recoginize the line of code AutoLogin.WebBrowser20.Document.Body.All("Input")
and it might work? but i havent been coding for a very long time and was wondering if you knew the reference that would define IHTMLElementCollection.
thx oh and also heres how i tried to fix it:
VB Code:
Do While i < j [U][B]objInputCol = AutoLogin.WebBrowser20.Document.Body.All("INPUT").All[/B][/U] 'The error is "null reference exception unhandled object refernece not set to an instance of an object" ' Set Keywords objInputCol("keywords").InnerText = WordGet() & vbCrLf 'If AutoLogin.WebBrowser20.Document.All(i).TagName = "INPUT" Then ' 'k = AutoLogin.cmbSubscribe.SelectedIndex + 1 ' Debug.Print(AutoLogin.WebBrowser20.Document.All(i).Name) ' If AutoLogin.WebBrowser20.Document.All(i).Name = "keywords" Then ' AutoLogin.WebBrowser20.Document.All(i).Focus() ' My.Computer.Keyboard.SendKeys(WordGet() & vbCrLf, True) ' AutoLogin.WebBrowser20.GoBack ' End If 'End If i = i + 1 Loop
I hope i dont sound too stupid im not a complete noob im just not very familiar with vb coding with html tags.




Reply With Quote