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
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