View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gareth[_6_] Gareth[_6_] is offline
external usenet poster
 
Posts: 158
Default Synchronizing VBA Script

Do you have a way of knowing when the data retrieval has been completed?
If so, something like

'Retrieve data

Do
DoEvents
Loop Until AllDataReceivedTest

Venu wrote:
How can I force the VBA script in Excel to wait till an Excel add-in function
completes retrieving data asynchronously from an external data source. I
tried Msgbox statement; but the OK button becomes active before the data
retrieval is completed.