Activate first workbook after closing second one?
Posted
by
user1830217
on Stack Overflow
See other posts from Stack Overflow
or by user1830217
Published on 2012-11-16T16:57:59Z
Indexed on
2012/11/16
16:59 UTC
Read the original article
Hit count: 145
excel-vba
Open workbook A.
Code in A opens workbook B.
B is now the active WB.
Code in B ends with ThisWorkBook.Close
B closes, so A appears.
Problem is, I can't get ANY Activate events in WB A to fire automatically after WB B closes.
But if I close WB B manually, using mouse to 'x' out the WB, or via the menus, then WB A triggers Activate events.
Somehow using VBA to close WB B prevents WB A Activate events from triggering.
Same results in Excel 97 and 2003
Am I missing something, or is there a workaround??
Thanks! John
© Stack Overflow or respective owner