I am working on automation of internet explorer 9 through excel VBA, it throws an error when I reach on the last line below:
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
ie.navigate "https://example.com/Main.asp"
'delay till readystate is complete
Set doc = ie.document
Set doc1 = doc.frames(2).document 'here comes the error
can anyone please help?
I had the same problem with some Excel VBA code after migrating to IE11. This is what I had to do to fix it:
old code which worked in IE8 but threw the error in IE11
new code which works in IE11 (I had to add a reference to Microsoft HTML Object Library under tools/references)
i Have face the same issue and it got resolved
This will work for IE 10+
Set doc = ie.document.frames
Set doc1 = doc.frames(2)
For the script element, readyState is no longer supported. Starting with Internet Explorer 11, use onload
IE 11 has different ways to access attributes