Hi everyone.
Working on MAC Excel / Ppt 2011, I am able to add commandbuttons to the equivalent of PC quick access toolbar (commandbars("Standard") since I am using the french version).
I can't get the custom buttons to appear with Icons only.
Set Tbt = Application.CommandBars("Standard").Controls.Add(Type:=msoControlButton)
With Tbt
.Caption = "TestButton"
.Visible = True
.style = 1
.FaceId = 13
.OnAction = ***
End With
As I understand it, the .Style property of the commandBarButton object should control this. Yet it doesn't work.
- My code includes "Cbt.style = msoButtonIcon", to no effect. What's more, the "s" of ".style" is not automatically changed to Cap letter as it should.
- The code as I pasted it inserts a button with no icon and the caption.
- If i disable the caption property, my new control is simply not displayed.
- If I set the entire commandbar to showing icons + captions for all buttons, then set it to icons only, then my button's Icon is properly shown. I haven't been able to find the commandbar property that would allow me to do that programatically.
Thank's for your help.
CPVM