D
David Jenkins
Here's my situation:
1) Workbook1 opens Workbook2 (in Workbook1's Workbook_Open
sub); code looks something like;
Workbooks.Open ("MktStatsData.xls")
DoOtherStuff
2) Workbook2 contains, in its Workbook_Open sub, the line
Application.OnTime Now + TimeSerial(0, 0, 30), _
"DoInitialAlign"
- this is necessary because workbook2 contains links to
a DDE server, and "DoInitialAlign" shouldn't be launched
until all the links are updated
3) however, workbook1 also depends on workbook2 having
finished running "DoInitialAlign", and there's my problem:
since Workbook2 simply opens, sets up the OnTime event,
and is "done" opening, the flow comes back to Workbook1
(at "DoOtherStuff") before Workbook2 is ready for
Workbook1 to access it.
So how can I have Workbook1 wait until Workbook2 has
actually finished running "DoInitialAlign"? Or can
someone think of a better solution?
TIA
David Jenkins
1) Workbook1 opens Workbook2 (in Workbook1's Workbook_Open
sub); code looks something like;
Workbooks.Open ("MktStatsData.xls")
DoOtherStuff
2) Workbook2 contains, in its Workbook_Open sub, the line
Application.OnTime Now + TimeSerial(0, 0, 30), _
"DoInitialAlign"
- this is necessary because workbook2 contains links to
a DDE server, and "DoInitialAlign" shouldn't be launched
until all the links are updated
3) however, workbook1 also depends on workbook2 having
finished running "DoInitialAlign", and there's my problem:
since Workbook2 simply opens, sets up the OnTime event,
and is "done" opening, the flow comes back to Workbook1
(at "DoOtherStuff") before Workbook2 is ready for
Workbook1 to access it.
So how can I have Workbook1 wait until Workbook2 has
actually finished running "DoInitialAlign"? Or can
someone think of a better solution?
TIA
David Jenkins