Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Commandbar button running macro
I have these code in the VBA. This code works and create
the controls on my command bar to run the respective macros. However, the name of the assigned macros were preceeded with the spreasheet's name, except for the last created control. How do I make the other controls behave like the last one. Set buttonSix = MyBar.Controls.Add (Type:=msoControlButton) With buttonSix '.FaceId = 133 .Caption = "Print Costing Section" .Style = msoButtonCaption .BeginGroup = True .OnAction = "Printcosting" End With Set buttonOne = MyBar.Controls.Add (Type:=msoControlButton) With buttonOne '.FaceId = 133 .Caption = "Show/Hide Unit/Total Price" .Style = msoButtonCaption .Tag = "EasyEntry" .BeginGroup = True .OnAction = "EasyEntry" End With Set buttonTwo = MyBar.Controls.Add (Type:=msoControlButton) With buttonTwo '.FaceId = 133 .Caption = "Checking" .Style = msoButtonCaption .BeginGroup = True .OnAction = "!SanityCheck" End With |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to exchange Custom Commandbar buttons between PC's? | Excel Discussion (Misc queries) | |||
In-place CommandBar.Add run-time error | Excel Discussion (Misc queries) | |||
Running a Macro through a button vs. VBA | Excel Discussion (Misc queries) | |||
commandbar problems | Excel Discussion (Misc queries) | |||
Controlling Font Name in a personnal Commandbar | Excel Programming |