Try this events in the ThisWorkbook module
It will disable it when you activate the workbook and restore it when
you close it or select a other workbook
Private Sub Workbook_Activate()
Application.CommandBars("Worksheet Menu Bar").FindControl _
(ID:=748, Recursive:=True).Enabled = False
End Sub
Private Sub Workbook_Deactivate()
Application.CommandBars("Worksheet Menu Bar").FindControl _
(ID:=748, Recursive:=True).Enabled = True
End Sub
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.