Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automating Internet Explorer

Status
Not open for further replies.

melusi

IS-IT--Management
Jul 31, 2002
13
ZA
I'm trying to automate internet explore with the following code on a command button cmdIntranet.(I want it to directly open IE).
Option Explicit
Dim WithEvents ie As InternetExplorer
Private Sub cmdExit_Click()
End
End Sub

Private Sub cmdIntranet_Click()

Set ie = New InternetExplorer
'Setting all the UI to be invisible
ie.ToolBar = False
ie.StatusBar = False
'Set starting size and location
ie.Width = 635
ie.Height = 500
ie.Left = 162
ie.Visible = True
ie.Navigate " frmMain.WindowState = 1
End Sub
And I get this Error message
"Class does not support automation or does not support expected interface"
Please
 
I changed your Set statement and it works for me, give this a try :-

Set ie = CreateObject("InternetExplorer.application")

Good Luck,
TopJack
 
You may need to use the webbrowser control. It's included in Microsoft Internet controls, which is Shdocvw.dll


________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
I have Tried the
Set ie = CreateObject("InternetExplorer.application")
But this time it gives me a Type mismatch error.
Any Help bro

 
You need to add a reference...
tools -> Reference -> Microsoft Internet Controls (shdocvw.dll)
It then works.

Dim WithEvents ie As InternetExplorer
Set ie = CreateObject("InternetExplorer.Application")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top