PDA

Click to See Complete Forum and Search --> : Fully load IE


plaqez
May 27th, 2001, 10:38 PM
Working in VB.

I need to make it wait until the page called in IE loads before going to the next command. I have just been using a pause but page keeps loading at different times and program keeps messing up.

Anyone know a code to make it wait for IE to fully load before continuing?

Any help is appreciated.

jjortiz
May 28th, 2001, 07:54 PM
You need to set a refrence to the Microsoft Internet Controls


Option Explicit
Dim WithEvents mIE As InternetExplorer

Private Sub cmdSendHTML_Click()
Dim TestDoc As HTMLDocument
Set TestDoc = mIE.document
TestDoc.body.innerHTML = txtHTML

End Sub

Private Sub Form_Load()
Set mIE = New InternetExplorer
mIE.Visible = True
mIE.navigate "www.microsoft.com"

End Sub

Private Sub mIE_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If pDisp Is mIE Then
MsgBox "Document is ready"
End If
End Sub