WebBrowser, Document Object Model, error 91
Code:
Dim HTML As HTMLDocument
Set HTML = IzoneBrowser.Document
HTML.All.Item("q").Value = "portfolioWatchList"
HTML.All.Item generates the compile error:
Run time error 91
Object variable or with block variable not set
RE: http://home.rochester.rr.com/lgssta...html#WEB_NEWWIN
does not mention any other 'Components' or 'References' . Before I added the above 3 lines, my application compiles and I could accessed the web site.
Question 1.) Why does this not compile?
----------------
At the point in the program where I inserted these line, the web site will have been completely loaded. However, the above reference always has the 3 lines of Question 1.) inside the following subroutine:
Code:
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If (pDisp Is WebBrowser1.Application) Then
End Sub
I don't see how there is a requirement to place the DOM code inside of the DocumentComplete. It would complicate my code to do so.
Question 2.) Please tell me if there is that requirement or not.
"The solution is out there somewhere."
Thanks,
Winnie-the-Pough

