I have found that when I close my Excel workbook using the "Workbook.Close" command, the Workbook_Activate event procedure in any workbook that is still open does not run. Is there a work-around for this?
In the workbook that I am closing there is no other code. The only code it contains is the command "Workbook.Close" within the Workbook_SheetSelectionChange event procedure. In the workbook that is still open when the first is closed the only code it contains
is the command "Beep" (which I placed a breakpoint on) in the Workbook_Activate event procedure.
I have found that if I close the workbook using the MacScript command - MacScript ("tell application ""System Events"" to keystroke ""w"" using command down") - it closes properly and the still open workbook's Workbook_Activate event procedure runs. But
this is not really a clean way to close a workbook and there are problems with it because it causes the Workbook_BeforeClose event procedure to run twice, for some reason.
Anyone know how to do a clean close?