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?
Many thanks
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