Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default 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
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
Event Trigger lobo Excel Programming 5 December 16th 05 08:33 PM
unable to get the excel app event trigger for for window resize [email protected] Excel Programming 0 November 30th 05 03:03 AM
Trigger Event Code Shawn Excel Programming 2 July 14th 05 02:33 PM
trigger an EVENT when the value in a cell changes? Controls Freak Excel Programming 1 December 21st 04 07:24 AM
Trigger Event Todd Huttenstine Excel Programming 2 July 14th 04 06:50 PM


All times are GMT +1. The time now is 11:25 PM.

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"