Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Window Trigger Event.
Excel 2003
I have 2 WBs open, say WB 1 & WB 2. WB 2 is visible or active, whilst WB1 is "hidden." If I close WB 2, is there anything, anywhere for macro purposes that is triggered by the appearance of WB 1. The command "Private Sub Workbook_SheetActivate(ByVal Sh As Object)" appears not to be triggered, presumably because the sheet is already effectively active. However, a "change" has undoubtedly occured in the prevailing conditions, as a different window gets displayed. The problem is, I can't find an associated trigger!! Any ideas. DonWB |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Window Trigger Event.
If WB1 is hidden and you do anything to WB2, including closing it, then WB1
is not the active workbook untile WB2 closes. Then it seems to me that WB1 would at least be the workbook with focus, although hidden. But the Sheet activate procedure might not run because the Workbook is tecnically open. The one event that occurs for sure is the Close event for WB2. Could you use that for your trigger? "donwb" wrote: Excel 2003 I have 2 WBs open, say WB 1 & WB 2. WB 2 is visible or active, whilst WB1 is "hidden." If I close WB 2, is there anything, anywhere for macro purposes that is triggered by the appearance of WB 1. The command "Private Sub Workbook_SheetActivate(ByVal Sh As Object)" appears not to be triggered, presumably because the sheet is already effectively active. However, a "change" has undoubtedly occured in the prevailing conditions, as a different window gets displayed. The problem is, I can't find an associated trigger!! Any ideas. DonWB |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Window Trigger Event.
Hi JLGWhiz
Yes, I agree with your analysis. I had hoped that the change of focus from WB 2 to WB 1 was a "recorded", event - a trigger - which could have been used but I guess it's not available to VBA? donwb "JLGWhiz" wrote in message ... If WB1 is hidden and you do anything to WB2, including closing it, then WB1 is not the active workbook untile WB2 closes. Then it seems to me that WB1 would at least be the workbook with focus, although hidden. But the Sheet activate procedure might not run because the Workbook is tecnically open. The one event that occurs for sure is the Close event for WB2. Could you use that for your trigger? "donwb" wrote: Excel 2003 I have 2 WBs open, say WB 1 & WB 2. WB 2 is visible or active, whilst WB1 is "hidden." If I close WB 2, is there anything, anywhere for macro purposes that is triggered by the appearance of WB 1. The command "Private Sub Workbook_SheetActivate(ByVal Sh As Object)" appears not to be triggered, presumably because the sheet is already effectively active. However, a "change" has undoubtedly occured in the prevailing conditions, as a different window gets displayed. The problem is, I can't find an associated trigger!! Any ideas. DonWB |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Event Trigger | Excel Programming | |||
unable to get the excel app event trigger for for window resize | Excel Programming | |||
Trigger Event Code | Excel Programming | |||
trigger an EVENT when the value in a cell changes? | Excel Programming | |||
Trigger Event | Excel Programming |