I have a VBA application that automates the placement of orders on a web site. To do so, I must fill-in a form, then go to the next page, click come buttons, go to the next page......
The code works, but not all the time. When I navigate to the next page, I am using DoEvents to wait for the page to load.
Do While ieApp.Busy: DoEvents: Loop
Do Until ieApp.READYSTATE = READYSTATE_COMPLETE: DoEvents: Loop
Sometimes the loop ends, but the next I was waiting to load did not load.