PDA

View Full Version : icon do not show of toolbar



lior03
03-30-2006, 04:06 AM
hello
i added a new button to the format toolbar in excel.it do not show on the toolbar.when i added it to the visual basic toolbar it appeared.
why?
is the a limit to how many icon i can add to a toolbar.

Sub f()
With Application.CommandBars("format").Controls.add
.Caption = "cell's number format"
.FaceId = 580
.Style = msoButtonIcon
.OnAction = "numberformation"
.BeginGroup = True
End With
End Sub


thanks

Bob Phillips
03-30-2006, 04:46 AM
Is format one of your commandbars or do you really mean Formatting? It works for me.

ALe
03-30-2006, 05:26 AM
Xld is right. The name of the bar is "Formatting" and not "Format"

lior03
03-30-2006, 05:37 AM
thank you very much.
can i decide where to locate the icon .i want it to be the secnnd from left.could it be doen.
thanks again

TonyJollans
03-30-2006, 12:21 PM
To position your new Control second from left, use With Application.CommandBars("Formatting").Controls.Add(Before:=2)However, if you are using Adaptive Menus there is no guarantee it will maintain that position.