B
Barb Reinhardt
I am loading a web page using the following piece of code. I'm sure I got it
from someone somewhere.
Sub LoadWebPage(myIE As SHDocVw.InternetExplorer, _
myURL As String)
If myIE Is Nothing Then
Set myIE = GetNewIE
End If
myIE.Visible = True
With myIE
'open page
.Navigate myURL
'wait until IE finished loading the page
Do While .ReadyState <> READYSTATE_COMPLETE
Application.Wait Now + TimeValue("0:00:01")
Loop
End With
myIE.Quit
End Sub
Function GetNewIE() As SHDocVw.InternetExplorer
'create new IE instance
Set GetNewIE = New SHDocVw.InternetExplorer
'start with a blank page
GetNewIE.Navigate2 "about:Blank"
GetNewIE.Visible = True
'GetNewIE.FullScreen = True 'So we don't copy the header
End Function
If the URL is http:// ... it will quit, but if the URL is something like
"T:", it won't quit, but also doesn't have an error. Can anyone give me
some idea how to address this?
Thanks,
Barb Reinhardt
from someone somewhere.
Sub LoadWebPage(myIE As SHDocVw.InternetExplorer, _
myURL As String)
If myIE Is Nothing Then
Set myIE = GetNewIE
End If
myIE.Visible = True
With myIE
'open page
.Navigate myURL
'wait until IE finished loading the page
Do While .ReadyState <> READYSTATE_COMPLETE
Application.Wait Now + TimeValue("0:00:01")
Loop
End With
myIE.Quit
End Sub
Function GetNewIE() As SHDocVw.InternetExplorer
'create new IE instance
Set GetNewIE = New SHDocVw.InternetExplorer
'start with a blank page
GetNewIE.Navigate2 "about:Blank"
GetNewIE.Visible = True
'GetNewIE.FullScreen = True 'So we don't copy the header
End Function
If the URL is http:// ... it will quit, but if the URL is something like
"T:", it won't quit, but also doesn't have an error. Can anyone give me
some idea how to address this?
Thanks,
Barb Reinhardt