how can i do this i get an error
Dim withevents IE As InternetExplorer
Private Sub Form_Load()
Set IE = CreateObject("InternetExplorer.application")
IE.Visible = True
End Sub
Printable View
how can i do this i get an error
Dim withevents IE As InternetExplorer
Private Sub Form_Load()
Set IE = CreateObject("InternetExplorer.application")
IE.Visible = True
End Sub
Try this:
Dim Withevents IE As Object
or
Dim IE As Object
Okay you are probably getting a user defined error. The code looks fine to me so i am not going to test it. Here is what i think that the problem is. You need to refrence the Microsoft Internet controls from Projects the refrences.
i did if i take out Dim withevents IE As InternetExplorer
and do this it works put i need the withevents
Private Sub Form_Load()
Set IE = CreateObject("InternetExplorer.application")
IE.Visible = True
End Sub
It's like jjortiz said: You will need to make a reference to the "Microsoft Internet Controls". Click Project\References, and then find and put a checkmark next to "Microsoft Internet Controls". Everything should work then, even with the Declaration Dim withevents IE As InternetExplorer.
I just tested the code. I mean when i posted the first time the code looked fine and it is. It works find on my system as long as the refrences the MS internet controls.
thanks i had the wrong thing reference
Hey hey no refrencing wrong things around here. People might get the wrong idea. Okay jjortiz stop with the dry humor and thanks. You are welcome.