Custom Toolbar - Edit Ribbon Name

Lee.

Board Regular
Joined
Dec 15, 2012
Messages
170
Hi,
I've got a macro to install a toolbar into excel when a spreadsheet is opened. The macro was originally wrote for Office 2003, however my staff are now migrating to Office 2010 - so when this toolbar installs, it installs under the "Add-In" tab.

Is there a way to rename the tab? Or create a specific one for the toolbar?

Code:
Private Sub Workbook_Open()
    On Error Resume Next
    Application.AutoRecover.Enabled = False
    Dim iCtr As Long
    Dim MacNames As Variant
    Dim CapNamess As Variant
    Dim TipText As Variant
    Application.CommandBars("Toolkit").Delete


    MacNames = Array("Program_1", "Program_2", "Program_3", "Program_4", "Program_5")
                    
    CapNamess = Array("Program 1", "Program 2", "Program 3", "Program 4", "Program 5")
                    
    TipText = Array("Launch Program 1", "Launch Program 2", "Launch Program 3", "Launch Program 4", "Launch Program 5")
                    
    With Application.CommandBars.Add
    .Name = "Toolkit"
    .Left = 200
    .Top = 200
    .Protection = msoBarNoProtection
    .Visible = True
    .Position = msoBarTop
    
    For iCtr = LBound(MacNames) To UBound(MacNames)
        With .Controls.Add(Type:=msoControlButton)
            .OnAction = "'" & ThisWorkbook.Name & "'!" & MacNames(iCtr)
            .Caption = CapNamess(iCtr)
            .Style = msoButtonIconAndCaption
            .FaceId = 3151
            .TooltipText = TipText(iCtr)
        End With
    Next iCtr
    End With
End Sub

Many thanks
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,214,593
Messages
6,120,435
Members
448,961
Latest member
nzskater

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