Re: workbook specific custom toolbars

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



The Workbook_Activate event only seems to occur when I use menu "Window" to
select a WB.
I use that to show the appropriate TB and Workbook_Deactivate to close the
other TB.
These events don't seem to be triggered when a WB "appears" following the
CLOSURE
of another.


"Bob Phillips" <BobNGs@xxxxxxxxxxxxx> wrote in message
news:O3WpLpZDJHA.4816@xxxxxxxxxxxxxxxxxxxxxxx
How about the Workbook_Activate event?

What event are you using to close the other toolbar?

--
__________________________________
HTH

Bob

"donwb" <2banshee2@xxxxxxxxxxxxx> wrote in message
news:%23q50HlZDJHA.4696@xxxxxxxxxxxxxxxxxxxxxxx
Excel 2003
I have 3 workbooks each having a specific custom toolbar associated with
it..
The toolbars are very different from each other.
The workbooks are all open and used together, the switching from one to
another -
when required - being achieved using "Window" in the menu bar.
When this is done, my code automatically selects the "incoming"
workbook's
associated toolbar OK and closes that of the "outgoing" book.
However, if I CLOSE (and save) any one of the WBs, say#1,
I want the next WB that appears (it doesn't matter which of the 2 left,
say #3)
to appear with it's correct associated bar.
The problem is I can't find a trigger event associated with the
appearance
of WB#3 when WB#1 closes, to trigger the appropriate selection code.

By selecting a WB from the menu "Window", Private Sub Workbook_Activate()
is triggered, but when a WB just appears, simply because another has been
closed,
it doesn't.

My optimism says there must be some way of catching this change,
but so far it's escaped me!
Help please
donwb





.


Quantcast