I\'ve already learned that creating a custom tab is in Excel not possible in this! post (unlike i.e. MSProject)
Specifically, can I change the paths of the macros to
This is some code I use to add a custom toolbar:
Set cbToolbar = Application.CommandBars.Add(csToolbarName, msoBarTop, False, True)
With cbToolbar
Set ctButton1 = .Controls.Add(Type:=msoControlButton, ID:=2950)
Set ctButton2 = .Controls.Add(Type:=msoControlButton, ID:=2950)
Set ctButton3 = .Controls.Add(Type:=msoControlButton, ID:=2950)
End With
With ctButton1
.Style = msoButtonIconAndCaption
.Caption = "Set &Picklists"
.FaceId = 176
.OnAction = "SetPicklist"
End With
With ctButton2
.Style = msoButtonIconAndCaption
.Caption = "Set &Defaults"
.FaceId = 279
.OnAction = "SetDefaults"
End With
With ctButton3
.Style = msoButtonIconAndCaption
.Caption = "&Visibility Settings"
.FaceId = 2174
.OnAction = "VisibilitySettings"
End With
With cbToolbar
.Visible = True
.Protection = msoBarNoChangeVisible
End With
The 'OnAction' controls the macro that runs... If you wanted to expand that to run a macro on a specific workbook, use "whatever.xls!MacroName"