View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Make VBA wait for return from external function

"Gib Bogle" wrote in message
Peter T wrote:
Search this group for "Shell and Wait". There are various approaches,
which will depend on what you are doing overall.


I did that, and found only your post.


So it does, sorry about that, try "ShellAndWait"

I would have thought that "Shell" applied to executing an external process
rather than to a call to a DLL routine. Am I wrong?


Yes you are right and perhaps I misunderstood your situation. Reading your
OP again I don't understand why there is such a problem calling your dll.
Normally when VBA (or an Excel formula) calls a function, even an external
function in a dll, code waits until the function returns its result.

Regards,
Peter T