Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have created macros in a workbook and I have assigned those macros t
toolbar buttons. How can I have the buttons appear only when I open that specifi workbook? I created a menu too, how can I have this menu appear only in tha workbook as well? Thank you. CHristian -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
something like
Private Sub Workbook_Open() With Application.CommandBars .Controls("Formatting").Controls("myButton").Visib le = True .Controls("Tools").Controls("myMenu").Visible = True End With End Sub Private Sub Workbook_Before(Cancel As Boolean) With Application.CommandBars .Controls("Formatting").Controls("myButton").Visib le = False .Controls("Tools").Controls("myMenu").Visible = False End With End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Christiane " wrote in message ... I have created macros in a workbook and I have assigned those macros to toolbar buttons. How can I have the buttons appear only when I open that specific workbook? I created a menu too, how can I have this menu appear only in that workbook as well? Thank you. CHristiane --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry Chrstiane, my error
Private Sub Workbook_Open() With Application.CommandBars("Formatting") .Controls("myButton").Visible = True End With With Application.CommandBars("Worksheet Menu Bar") .Controls("Tools").Controls("myMenu").Visible = True End With End Sub Private Sub Workbook_Before(Cancel As Boolean) With Application.CommandBars("Formatting") .Controls("myButton").Visible = False End With With Application.CommandBars("Worksheet Menu Bar") .Controls("Tools").Controls("myMenu").Visible = False End With End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Christiane " wrote in message ... It doesn't recognize controls ?? --- Message posted from http://www.ExcelForum.com/ |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What do I put where it says formatting and mybutton
-- Message posted from http://www.ExcelForum.com |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Christiane,
The Formatting is the name of the toolbar to put the button on, and MyButton is just a handle to hang onto the button, for id purposes. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Christiane " wrote in message ... What do I put where it says formatting and mybutton? --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
make buttons bigger on quick access toolbar | Excel Discussion (Misc queries) | |||
Toolbar buttons | Excel Discussion (Misc queries) | |||
custom toolbar buttons are saved where? Excel loads twice bymistake and all my custom toolbar buttons get gone!!! | Excel Programming | |||
How to make toolbar buttons larger? | Excel Programming | |||
saving toolbar buttons on custom toolbar | Excel Programming |