Results 1 to 2 of 2

Thread: Waiting for page to fully load!

  1. #1

    Thread Starter
    PowerPoster Beacon's Avatar
    Join Date
    Jan 2001
    Location
    Pub Floor
    Posts
    3,188

    Question

    Using ms internet control, how can i tell if a page is fully loaded b4 i execute the rest of the code.
    E.g

    Private Sub Form_Load()
    Web.Navigate "http://www.riu.com.au/gold/secure/v5i34/contents.htm " 'wait for this page to fully load b4 executing the rest?
    selct
    copy
    pste
    Dim objSearch As Collection
    Dim varSearch As Variant
    Dim intPos As Integer

    Set objSearch = New Collection
    objSearch.Add "mining"
    objSearch.Add "aurora"
    objSearch.Add "ccc"

    intPos = 0
    For Each varSearch In objSearch

    intPos = InStr(1, Text1.Text, varSearch)
    If intPos > 0 Then
    MsgBox varSearch & " was found in (" & _
    Text1.Text & ") at position " & intPos
    nextsite
    Else
    MsgBox "no results"
    nextsite
    End If
    Next
    End Sub

  2. #2
    Addicted Member GungaDin's Avatar
    Join Date
    Apr 2001
    Location
    Brisbane, Australia
    Posts
    146
    Use the DocumentComplete event of the MS Internet Control. This will only fire when the page is fully loaded.

    Hope this helps,

    Nathan Liebke

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