I use this. You can put it into a class if you want multiple IEs active. If used in a module it will re-use the IE if it has one.
Private f_objIE As Object
.......
Public Sub IExplore(strURL As String)
Dim strResponse As String
If Not f_objIE Is Nothing Then
On Error Resume Next
f_objIE.Visible = True
strResponse = Err.Description
If Len(strResponse) > 0 Then
Set f_objIE = Nothing
End If
On Error GoTo 0
End If
If f_objIE Is Nothing Then
On Error Resume Next
Set f_objIE = CreateObject("InternetExplorer.Application"
On Error GoTo 0
End If
On Error Resume Next
f_objIE.Visible = True
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.