View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Die_Another_Day Die_Another_Day is offline
external usenet poster
 
Posts: 644
Default Toolbar Help - keeping it specific

In the vb editor, open your PremierLeague.xls project. In the
"ThisWorkbook" code select the Workbook_Activate Event and place this
code:
Application.CommandBars("Premier League").Visible = True
Now select the Workbook_Deactivate Event and place this code
Application.CommandBars("Premier League").Visible = False

Charles Chickering
xl Geek

wrote:
I have read a few threads on here and none of them seem to either work
or be simplistic enough for me to understand...

I have a toolbar (Name: Premier League) and I want it to work only with
one workbook (Name: PremierLeague.xls).

I have attached the toolbar to this workbook but it is available with
every workbook.

The toolbar has buttons that contain the club crest of every club in
the premier league. I do not want to lose the pictures from the buttons
so the 'delete on closing, create on opening' code does not work...

Is there anyway of making this toolbar disappear when other
spreadsheets are open and reappear when I open PremierLeague.xls?

Cheers

Jamie