Hi all-
I'm reusing some code from another project (another PC) and having some trouble getting it to work. I get the "object library feature not supported" error when I try to run the code, if I understand correctly this is a compile error. I can't tell you what version of IE was on the original PC, but on the current PC it is IE9 (and can't be updated).
Is the information below sufficient for anyone to tell me what is going wrong here?
Here are my checked references:
Here is the code:
Sub Random()
'to refer to the running copy of Internet Explorer
Dim ie As InternetExplorer
'to refer to the HTML document returned
Dim html As HTMLDocument
'open Internet Explorer in memory, and go to website
Set ie = New InternetExplorer
ie.Visible = False
ie.navigate http://www.mywebsitename.com/ 'this has a valid website name in the real code, I've replaced it with an anonymized URL
Do While ie.readyState <> READYSTATE_COMPLETE
DoEvents
Loop
For i = 1 To 1 '1000
ie.Refresh
Do While ie.readyState <> READYSTATE_COMPLETE
DoEvents
Loop
Application.Wait (Now + TimeValue("0:00:01"))
'text of HTML document returned
Set html = ie.document '<<-- this is what is highlighted as an error
etc.