Consulting

Results 1 to 5 of 5

Thread: icon do not show of toolbar

  1. #1
    VBAX Mentor
    Joined
    Jun 2005
    Posts
    374
    Location

    icon do not show of toolbar

    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.
    [VBA]
    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

    [/VBA]
    thanks
    moshe

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Is format one of your commandbars or do you really mean Formatting? It works for me.

  3. #3
    VBAX Mentor ALe's Avatar
    Joined
    Aug 2005
    Location
    Milan
    Posts
    383
    Location
    Xld is right. The name of the bar is "Formatting" and not "Format"

  4. #4
    VBAX Mentor
    Joined
    Jun 2005
    Posts
    374
    Location
    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
    moshe

  5. #5
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    To position your new Control second from left, use [vba]With Application.CommandBars("Formatting").Controls.Add(Before:=2)[/vba]However, if you are using Adaptive Menus there is no guarantee it will maintain that position.
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •