\r\n\r\n
Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > VBA / Office Integration > Excel > Wait on IE to finish before moving on


\r\n \r\n
 
 
Thread Tools Display Modes

\r\n\r\n\r\n
After if fire this event Excel doesn\'t always wait long enough for the event to complete - I put in a dumb loop to "usually" works, but I know there\'s a correct way to do this. Any ideas?
\r\n
\r\nie.document.getElementById("ctl00_ctl00_cphMain_cphMain_ddlReceiveBran ch").fireevent ("onchange")
\r\n
\r\n\'WHAT I\'M USING
\r\n For dumb = 0 To 100000
\r\n DoEvents
\r\n Next
\r\n
\r\n\'THESE DON\'T WORK...
\r\n Do While ie.busy
\r\n DoEvents
\r\n Loop
\r\n
\r\n Do While ie.ReadyState <> 4
\r\n DoEvents
\r\n Loop
\r\n \r\n\r\n
\r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n
\r\n \r\n \r\n \r\n \r\n Reply With Quote\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n \r\n\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n \r\n \r\n \r\n \r\n\r\n\r\n\r\n\r\n'; pd[1395045] = '\r\n\r\n \r\n\r\n
\r\n
\r\n
\r\n\r\n
\r\n \r\n\r\n\r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n \r\n
\r\n
\r\n  \r\n #2  \r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n Old\r\n \r\n 07-15-2012, 07:52 AM\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n
\r\n\r\n
\r\n \r\n mjclare\r\n mjclare is offline\r\n\r\n\r\n
Prev Previous Post   Next Post Next
  #1  
Old 07-14-2012, 05:40 PM
brittonsm brittonsm is offline
Newcomer
 
Join Date: Jul 2012
Posts: 2
Default Wait on IE to finish before moving on


After if fire this event Excel doesn't always wait long enough for the event to complete - I put in a dumb loop to "usually" works, but I know there's a correct way to do this. Any ideas?

ie.document.getElementById("ctl00_ctl00_cphMain_cphMain_ddlReceiveBran ch").fireevent ("onchange")

'WHAT I'M USING
For dumb = 0 To 100000
DoEvents
Next

'THESE DON'T WORK...
Do While ie.busy
DoEvents
Loop

Do While ie.ReadyState <> 4
DoEvents
Loop
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->