G
Gixxer_J_97
Hi all,
I am using custom command bars (a different one for each sheet in my workbook)
my question is, how do i get it to 'deactivate' when the workbook is changed?
i'm assuming the code would go in ThisWorkbook under
Private Sub Workbook_Deactivate()
End Sub
but i'm lost as to how to 1) deactivate the command bar and 2) know which
one to deactivate.
my bars are defined like this
Sheet 1:
Set cb = Application.CommandBars.Add("MyBar1", msoBarFloating)
Sheet 2:
Set cb = Application.CommandBars.Add("MyBar2", msoBarFloating)
etc
any help?
tia!
J
I am using custom command bars (a different one for each sheet in my workbook)
my question is, how do i get it to 'deactivate' when the workbook is changed?
i'm assuming the code would go in ThisWorkbook under
Private Sub Workbook_Deactivate()
End Sub
but i'm lost as to how to 1) deactivate the command bar and 2) know which
one to deactivate.
my bars are defined like this
Sheet 1:
Set cb = Application.CommandBars.Add("MyBar1", msoBarFloating)
Sheet 2:
Set cb = Application.CommandBars.Add("MyBar2", msoBarFloating)
etc
any help?
tia!
J