Hide menu items

  • Thread starter Thread starter Cresta
  • Start date Start date
C

Cresta

Hello

Could some one point me in the right direction please.

By right clicking on a sheet tab a context menu pops up, I need to hide this
menu so it is not available for a particular file for ceratain uses. I'm
guessing I would us XXX_getVisible callback, but I dont know how to reference
the menu.

Thanks
 
Hi,

You can use the worksheet event before right click.

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As
Boolean)
If Environ("Username") <> "USER" Then
Cancel = True
End If
End Sub

Mike
 
Apologies I misread your post this disbale right click on worksheet not the
sheet tab.

Mike
 
Wrapped in a suitable if statement his disable the right click on the sheet tab

Application.CommandBars("Ply").Enabled = False

Re-Enable with true

Mike
 

Ask a Question

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.

Ask a Question

Back
Top