Results 1 to 2 of 2

Thread: Fully load IE

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2001
    Location
    FL
    Posts
    21

    Fully load IE

    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.

  2. #2
    Frenzied Member jjortiz's Avatar
    Join Date
    Mar 2001
    Location
    NYC
    Posts
    1,768
    You need to set a refrence to the Microsoft Internet Controls

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width