Hi everybody:
I have the following cod whcih I got it from one news group and I said
to It let the internet explorer start navigate in the same window but
when I try it I found nothing this si the code:
Option Explicit
Private MyExplorer As InternetExplorer
Private Sub Command1_Click()
FirstExplorer.Navigate "www.google.com"
End Sub
Public Function FirstExplorer() As InternetExplorer
' REFERENCE Microsoft Internet Controls for:
Dim SW As ShellWindows
Dim IE As InternetExplorer
If MyExplorer Is Nothing Then
Set SW = New ShellWindows
For Each IE In SW
If TypeName(IE.Document) = "HTMLDocument" Then
Set MyExplorer = IE
Exit For
End If
Next
If MyExplorer Is Nothing Then
' If there is no Explorer open, then what?
Set MyExplorer = New InternetExplorer
End If
End If
Set FirstExplorer = MyExplorer
End Function
So any help to adjust this code and let it work
regard's
Husam
|