smilitaru
asked on
GetObject with InternetExplorer
I want to take a reference from an open InternetExplorer object, but GetObject return the error:
"ActiveX component can't create object"
I used the code:
Dim ie As SHDocVw.InternetExplorer
Set ie = GetObject(, "InternetExplorer.Applicat ion")
Creating InternetExplorer has no problem with:
Dim ie As SHDocVw.InternetExplorer
Set ie = CreateObject("InternetExpl orer.Appli cation")
"ActiveX component can't create object"
I used the code:
Dim ie As SHDocVw.InternetExplorer
Set ie = GetObject(, "InternetExplorer.Applicat
Creating InternetExplorer has no problem with:
Dim ie As SHDocVw.InternetExplorer
Set ie = CreateObject("InternetExpl
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
yes you need to supply a zero length string for it to work. btw, why are you using getobject in this case anyways?
ASKER
Comment accepted as answer
ASKER
Thanks BobbyOwens
It is just what I need.
Do you know something similar for Netscape?
It is just what I need.
Do you know something similar for Netscape?
You might be able to use the same using the "WebBrowser" object instead of "InternetExplorer" object when processing the Shellwindows collection. I've never tried this though
set ie = GetObject("", "InternetExplorer.Applicat
You need to supply a zero.length string ("")