ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Toolbar Help - keeping it specific (https://www.excelbanter.com/excel-programming/369247-toolbar-help-keeping-specific.html)

[email protected]

Toolbar Help - keeping it specific
 
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


Die_Another_Day

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




All times are GMT +1. The time now is 03:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com