Custom Commandbar Separator

FIFARay007

Board Regular
Joined
Jan 7, 2008
Messages
111
I have some code that adds a custom commandbar to Excel, and have been able to add a few buttons to it. How can I add a separator between 2 of them?

sample from my code...

Code:
    Set Mycbar = CommandBars.Add(Name:="EssMenu", Position:=msoBarTop, Temporary:=False)
    
    Set Mycontrol = Mycbar.Controls.Add(msoControlButton)
    With Mycontrol
        .Caption = "Essbase Login"
        .Tag = "Login"
        .OnAction = "Connect"
        .FaceId = 277
    End With
    
    Set Mycontrol = Mycbar.Controls.Add(msoControlButton)
    With Mycontrol
        .Caption = "Retrieve"
        .Tag = "Retrieve"
        .OnAction = "Retrieve"
        .FaceId = 317
    End With
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,215,463
Messages
6,124,962
Members
449,200
Latest member
indiansth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top