Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Webbrowser Control - How do I get it to WAIT ?? 1

Status
Not open for further replies.

MarkDicken

IS-IT--Management
Jun 5, 2000
55
CH
Can anyone help me with the Webbrowser Object, basically I want to load up a page and then save it to disk and have this in a loop. I have tried the .busy option but it does not work for me??? The FULL EXAMPLE is below :-

This is a script I wish to run on the Latest Jobs so I can get automatic notifications when a suitable contract position is posted.

Regards, Mark Dicken

Dim memPageNo
Dim memPageName
memPageName = "memPageNoStart = 12648639
memPageNoFinish = 12648659

Do While memPageNoStart < memPageNoFinish
memFullPageName = memPageName &amp; memPageNoStart
Me![txtViewURL] = memFullPageName
Me!myweb.Navigate Me![txtViewURL]

Rem *** NEED A BIT OF CODE to WAIT for the above
Rem NAVIGATED TO LOAD PLEASE CAN ANYONE HELP ME
Rem IN THIS AREA !!!!!!!!!!!!!!!!!!

Me![txt1] = myweb.Document.body.innerHTML

Open &quot;c:\jobserve\&quot; &amp; memPageNoStart &amp; &quot;.txt&quot; For Output As #1
Print #1, Me![txt1]
Close #1

memPageNoStart = memPageNoStart + 1
Me.Repaint
Me![txt1] = Null
Loop
 
Look at DoEvents in help
This example may work for you.
-----------------------
The following example uses the DoEvents function to return control to the operating system while a loop is executing. The DoEvents function always returns 0.

Sub LongLoop()
Dim intI As Integer

For intI = 1 To 1500 ' Start loop.
If intI Mod 100 = 0 Then ' If loop has repeated 100 times.
DoEvents ' Yield to operating system.
Debug.Print intI
End If
Next intI ' Increment loop counter.
End Sub




DougP, MCP
dposton@universal1.com

Ask me how Bar-codes can help you be more productive.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top