Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Customise Button on toolbar
I am trying to get a menu button to change its text based on an action
I have a series of commands to either hide or show toolbars 'Group1 Application.CommandBars("Standard").Visible = True Application.CommandBars("Formatting").Visible = True Application.CommandBars("Control Toolbox").Visible = True Application.CommandBars("Hyperion Essbase").Visible = True Application.CommandBars("Walmac").Visible = False CommandBars("Worksheet Menu Bar").Enabled = True Application.DisplayFormulaBar = True ' 'Group2 Application.CommandBars("Standard").Visible = False Application.CommandBars("Formatting").Visible = False Application.CommandBars("Control Toolbox").Visible = False Application.CommandBars("Hyperion Essbase").Visible = False CommandBars("Worksheet Menu Bar").Enabled = False Application.DisplayFormulaBar = False Application.CommandBars("Walmac").Visible = True when the action in group1 are done I want the button text to say HideToolbars, then when I select the button it will do the actions in group2 and the text should change to Show Toolbars and so on any suggestions thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Customise Button on toolbar
In the Hide macro , add this code
With Application.CommandBars.ActionControl .Caption = "Show Toolbars" End With and in the show, With Application.CommandBars.ActionControl .Caption = "Hide Toolbars" End With -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Nigel" wrote in message ... I am trying to get a menu button to change its text based on an action I have a series of commands to either hide or show toolbars 'Group1 Application.CommandBars("Standard").Visible = True Application.CommandBars("Formatting").Visible = True Application.CommandBars("Control Toolbox").Visible = True Application.CommandBars("Hyperion Essbase").Visible = True Application.CommandBars("Walmac").Visible = False CommandBars("Worksheet Menu Bar").Enabled = True Application.DisplayFormulaBar = True ' 'Group2 Application.CommandBars("Standard").Visible = False Application.CommandBars("Formatting").Visible = False Application.CommandBars("Control Toolbox").Visible = False Application.CommandBars("Hyperion Essbase").Visible = False CommandBars("Worksheet Menu Bar").Enabled = False Application.DisplayFormulaBar = False Application.CommandBars("Walmac").Visible = True when the action in group1 are done I want the button text to say HideToolbars, then when I select the button it will do the actions in group2 and the text should change to Show Toolbars and so on any suggestions thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I customise quick access toolbar button images in Excel 200 | Excel Discussion (Misc queries) | |||
Customise the summation function / button | Excel Worksheet Functions | |||
how can I customise a toolbar with a tag that holds macros | Charts and Charting in Excel | |||
customise button(macro) on toolbar / workbook protection | Excel Programming | |||
Delete a custom button by holding down the ALT key and dragging the button off the toolbar | Excel Programming |