Getting IE To Wait

abbaddon223

Registered User.
Local time
Today, 07:32
Joined
Mar 13, 2010
Messages
162
Hi,

I am using VBA to get information from a webform. The issue I am having is that once I have executed the run query on the web form, I cannot get my VBA code to wait until the page has fully loaded.

I've tried

While ie.Busy
DoEvents
Wend

Which doesn't work ; - (

The code I am using is:

ie.Document.getElementById("ctlEndUserConsentCheckBox").Checked = True

ie.Document.getElementById("chbSearchOpenreach").Checked = True

While ie.Busy
DoEvents
Wend

ie.Document.getElementById("ctlCliTextBox").Value = [CLI].Value
ie.Document.getElementById("ctlPostCodeTextBox").Value = [Postcode].Value

While ie.Busy
DoEvents
Wend

ie.Document.all("ctlViewInstallationDetailsButton").Click

'wait until the page loads needed here

[Service_Type].Value = ie.Document.getElementById("ctlServiceTypeValue").Innertext
End Sub

Thanks for any help!!
 

Users who are viewing this thread

Back
Top Bottom