Thread: Timing problem
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Stephen Bullen[_3_] Stephen Bullen[_3_] is offline
external usenet poster
 
Posts: 74
Default Timing problem

Hi David,

So how can I have Workbook1 wait until Workbook2 has
actually finished running "DoInitialAlign"? Or can
someone think of a better solution?


Obviously you can't <g. If Workbook2 knows it's being started by
workbook 1, it could use application.run to call the code in workbook1
from it's DoInitialAlign routine. If not, you need to decide how does
workbook1 know when/if workbook is ready? For example, workbook2 could
set a cell value to True in the DoInitialAlign routine. Workbook1 has
a repeating OnTime procedure that checks the cell value every few
seconds, continuing its stuff when it sees the True in there.

The solution depends on whether you can modify workbook2. If so,
calling back into workbook1 (if open) would be the best solution.

Regards

Stephen Bullen
Microsoft MVP - Excel
www.BMSLtd.ie