Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using Office 2003 on Windows XP.
Is there a way when opening a second file programmatically, to allow the second file's ON_OPEN event code to finish before performing other tasks with it from the first file? e.g. User is in File1 and triggers File2 to open. File1 waits for File2's ON_OPEN code to finish, then File1's code resumes... I tried pausing my code in the calling file, but I still get "Application Defined Error". Any suggestions? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That's the way it's supposed to work. Excel isn't multithreaded (if I used that
correctly). It starts something (like the workbook_open event, it'll finish that before returning to the original code). Are you opening the second workbook in the same instance of excel? (That could make a difference, since there would be two copies of excel running.) quartz wrote: I am using Office 2003 on Windows XP. Is there a way when opening a second file programmatically, to allow the second file's ON_OPEN event code to finish before performing other tasks with it from the first file? e.g. User is in File1 and triggers File2 to open. File1 waits for File2's ON_OPEN code to finish, then File1's code resumes... I tried pausing my code in the calling file, but I still get "Application Defined Error". Any suggestions? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
run external programs | Excel Discussion (Misc queries) | |||
Going Between Programs | Excel Discussion (Misc queries) | |||
Deleting VBA programs | Excel Discussion (Misc queries) | |||
VBA programs | Excel Programming |