Attach a tool bar to a specific BOOK

  • Thread starter Thread starter pcor
  • Start date Start date
P

pcor

Hi
I have a custom tool bar called DIP
I want to have that tool bar show up ONLY when I am working on a book called
MONEY
and not be visible at other time Excel is opend
Can this be done
Thanks
 
I think you'll need some application event code for this. Chip Pearson has some
nice notes at:

http://www.cpearson.com/excel/AppEvent.htm
(and an example workbook, too)

Another option is to add a check to each of your macros:

If LCase(ActiveWorkbook.Name) <> "money.xls" Then
MsgBox "cannot work on this workbook"
Exit Sub
End If
 
And if the macros are part of money.xls, maybe you could look at hiding the
toolbar with workbook_deactivate and showing them with workbook_activate.

I searched google for "workbook_deactivate commandbars" and found this:

http://groups.google.com/[email protected]
by Orlando Magalhães Filho

==
and something I just learned. There's a bug/feature in xl2k that stops the
workbook_activate from firing when you toggle between workbooks using alt-Tab.
 
Back
Top