LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Make VBA wait for return from external function

Harald Staff wrote:

"Gib Bogle" wrote in message
...
To be honest this is not my problem. A poster asked this question on
a Fortran forum, and my curiosity was provoked. The poster says that
"...Excel 2007 VBA skips over calls [to his Fortran DLL] that take any
time to execute. If I go into debug mode for the VBA and pause after
the call the code completes and the results are passed into Excel."


If it works stepping and pausing through, a simple
DoEvents
usually does the trick when you want to wait for a calculation or
similar. (Not including full loading of webpages and such demanding tasks)

X = MyBogusFunction(y)
DoEvents
Range("A1").Value = X

HTH. Best wishes Harald


Thanks, I'll pass that advice on.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
60 Second Countdown NOT using the WAIT function... Trevor Williams Excel Programming 18 October 28th 09 05:13 AM
wait function N+ Excel Programming 2 February 10th 08 10:17 PM
Make onTimer wait until Excel finish database request? news.stofanet.dk Excel Programming 2 March 4th 07 08:36 PM
How do I make the true return a drop down list in the IF function? Brian Excel Worksheet Functions 5 April 13th 06 09:40 PM
Web Query Sleep or Wait for return values Sunil_Modi Excel Programming 2 November 19th 04 05:15 PM


All times are GMT +1. The time now is 07:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"