Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default <Pass the Torch from a Closing Workbook

All,
I am working with two workbooks, wbA and wbB.

wbA opens wbB. wbB does some work interactively with the user, then the user
closes wbB with a button on a modeless userform uaing the statement
"ThisWorkbook.Close".

I wish wbA to detect that wbB is now closed and to continue its work.(e.g.:
Show a userform in the context of the file which was just exited).

The Problem:
If the user closes wbB manually, wbA WorkbookActivate event is fired. (This
is good)
If the ThisWorkbook.Close command is initiated in wbB itself, no
WorkbookActivate event is
triggered when wbB closes . It becomes impossible to detect, from wbA, that
wbB is closed
(This is bad).

Any suggestions?

Thanks for your help,
Alex J






  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default <Pass the Torch from a Closing Workbook

"Alex J" wrote...
....
wbA opens wbB. wbB does some work interactively with the user, then the

user
closes wbB with a button on a modeless userform uaing the statement
"ThisWorkbook.Close".

I wish wbA to detect that wbB is now closed and to continue its work.(e.g.:
Show a userform in the context of the file which was just exited).

....

If wbB should only open when wbA opens it, and control should return to wbA
when it's closed, why not have the button in the userform in wbB call a
macro in wbA that closes wbB and proceeds on to whatever else you want wbA
to do?

--
To top-post is human, to bottom-post and snip is sublime.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default <Pass the Torch from a Closing Workbook

Harlan,
Can I infer that you provided a SUBLIMinal response to my question <BG?

I had already attempted your suggestion, and ended up with some problems,
hence the desire to use an event. I'll try this again.

Regards,
Alex



"Harlan Grove" wrote in message
...
"Alex J" wrote...
...
wbA opens wbB. wbB does some work interactively with the user, then the

user
closes wbB with a button on a modeless userform uaing the statement
"ThisWorkbook.Close".

I wish wbA to detect that wbB is now closed and to continue its

work.(e.g.:
Show a userform in the context of the file which was just exited).

...

If wbB should only open when wbA opens it, and control should return to

wbA
when it's closed, why not have the button in the userform in wbB call a
macro in wbA that closes wbB and proceeds on to whatever else you want wbA
to do?

--
To top-post is human, to bottom-post and snip is sublime.




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
pass variable from one workbook to another calebjill Excel Discussion (Misc queries) 2 January 28th 09 07:38 PM
Pass workbook name to ActiveX DLL (VB6) meldrum_scotland Excel Discussion (Misc queries) 0 August 8th 08 06:07 PM
Pass word protecting multipul worksheets within a workbook Terrie Excel Discussion (Misc queries) 1 December 31st 07 09:23 PM
<Pass the Torch from a Closing Workbook Alex J Excel Programming 0 January 6th 04 03:56 AM
closing workbook Sam Dickins Excel Programming 1 November 27th 03 03:43 PM


All times are GMT +1. The time now is 10:33 AM.

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

About Us

"It's about Microsoft Excel"