Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 441
Default Dueling programs

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Dueling programs

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
run external programs Stephen Miller Excel Discussion (Misc queries) 1 May 24th 10 09:40 PM
Going Between Programs bscuga Excel Discussion (Misc queries) 1 May 6th 08 03:43 PM
Deleting VBA programs paulrm906 Excel Discussion (Misc queries) 2 December 16th 05 03:59 PM
VBA programs [email protected] Excel Programming 1 August 5th 05 11:32 AM


All times are GMT +1. The time now is 09:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"