Custom Toolbar Dropdown problem

bandit_1981

Board Regular
Joined
Aug 17, 2005
Messages
201
Hello all,

I use a custom toolbar and i am trying to add a dropdown control as the last item in it. It adds it but does not display the last button. If i take it out it display the last button. What am i missing?

Code:
    Set NewBtn = TBar.Controls.Add(Type:=msoControlButton)
    With NewBtn
    .OnAction = "showbackup"
    .Caption = "Backup/Restore"
    .TooltipText = "Click here to backup or restore a client"
    .Style = msoButtonIconAndCaption
    .FaceId = 367
    .BeginGroup = True
    End With
    
    Set NewBtn = TBar.Controls.Add(Type:=msoControlButton)
    With NewBtn
    .OnAction = "ClosePlanner"
    .Caption = "Close Planner"
    .TooltipText = "Click here to close this planner"
    .Style = msoButtonIconAndCaption
    .FaceId = 1088
    .BeginGroup = True
    End With
    
    Set NewBtn = TBar.Controls.Add(Type:=msoControlDropdown)
    With NewBtn
    .OnAction = ""
    .Caption = "Navigation"
    .TooltipText = ""
    .Style = msoButtonIconAndCaption
    .BeginGroup = True
    End With
 

Some videos you may like

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Watch MrExcel Video

Forum statistics

Threads
1,118,530
Messages
5,572,675
Members
412,481
Latest member
nhantam
Top