Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XL 2003 Menu vanishes on sheet change 1

Status
Not open for further replies.

RonRepp

Technical User
Feb 25, 2005
1,031
US
Hi, All:

I have a custom menu that works great unless you click a chart sheet, and then it hides. I'm assuming that XL uses a different menubar for a chart sheet, or rewrites it.

In either case, I can trap it @ the SheetActivate procedure (see below), but if I delete that custom and add one, then it vanishes for the other sheet types.

Any ideas? I tried just making it visible, and that didn't work.

Code:
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
    On Error Resume Next
    'MsgBox Sh.Type
    If Sh.Type = 3 Then
        'Excel.Application.CommandBars("Worksheet Menu Bar").Controls("Worksheets").Visible = True
            'Call DeleteWorksheetsMenu
            'Call AddWorksheetsMenu

    End If
End Sub

Thanks,


Ron Repp

If gray hair is a sign of wisdom, then I'm a genius.

My newest novel: Wooden Warriors
 
Excel automatically changes the 'Visible' property of commandbar, for chartsheet the menubar name is "Chart Menu Bar"

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top