S
Sgt Waddle
Hello,
I have been using the following function to change the faceid on a
commandbar button once it has been clicked:
Function ChangeFace()
Dim OldCTRL
Set OldCTRL =
CommandBars("SHOW").Controls(CommandBars.ActionControl.Caption)
OldCTRL.FaceId = 1087
OldCTRL.Style = msoButtonIconAndCaptionBelow
End Function
The function is called when each button is clicked.
the line Set OldCTRL = CommandBars("SHOW").Controls
CommandBars.ActionControl.Caption) sets which button on the commandbar named
SHOW called the function.
I would like to be able to capture which commandbar and which button called
the function so I can use the same function from different commandbars.
Something like (pseudo code)
Set OldCTRL =
CommandBars(ActiveCommandBar).Controls(CommandBars.ActionControl.Caption)
Any help is greatly appreciated,
Kevin
I have been using the following function to change the faceid on a
commandbar button once it has been clicked:
Function ChangeFace()
Dim OldCTRL
Set OldCTRL =
CommandBars("SHOW").Controls(CommandBars.ActionControl.Caption)
OldCTRL.FaceId = 1087
OldCTRL.Style = msoButtonIconAndCaptionBelow
End Function
The function is called when each button is clicked.
the line Set OldCTRL = CommandBars("SHOW").Controls
CommandBars.ActionControl.Caption) sets which button on the commandbar named
SHOW called the function.
I would like to be able to capture which commandbar and which button called
the function so I can use the same function from different commandbars.
Something like (pseudo code)
Set OldCTRL =
CommandBars(ActiveCommandBar).Controls(CommandBars.ActionControl.Caption)
Any help is greatly appreciated,
Kevin