you'll want the "Workbook Tabs" popup..
Normally you'd rightclick the arrows in the bottomleft
part of a window.. but you can add it to the menu bar
like:
Sub CreateMenu_Navigator()
Const MYTAG = "WBT"
With CommandBars
While Not .FindControl(Tag:=MYTAG) Is Nothing
.FindControl(Tag:=MYTAG).Delete
Wend
End With
With CommandBars("Worksheet Menu Bar")
With .Controls.Add(msoControlPopup, temporary:=True)
.Tag = MYTAG
.Caption = "Navigator"
.OnAction = "showWBT"
End With
End With
End Sub
Sub showWBT()
CommandBars("Workbook Tabs").ShowPopup
End Sub
--
keepITcool
|
www.XLsupport.com | keepITcool chello nl | amsterdam
Christopher Sequeira wrote :
I need a code to add a custom menu to worksheet menu bar and populate
it with the sheet name in the workbook. Further, if one clicks the
particular sheet name, only that particular sheet should be visible.
I tried populating the menu with sheet name in the workbook, however,
I am unable to do the later.
Any suggestions..