Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide menu items
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide menu items
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 "Cresta" wrote: 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide menu items
Apologies I misread your post this disbale right click on worksheet not the
sheet tab. Mike "Mike H" wrote: 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 "Cresta" wrote: 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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide menu items
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 "Mike H" wrote: Apologies I misread your post this disbale right click on worksheet not the sheet tab. Mike "Mike H" wrote: 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 "Cresta" wrote: 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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide menu items
Application.CommandBars("Ply").Enabled = False ' True
Gord Dibben MS Excel MVP On Tue, 13 Jan 2009 00:49:02 -0800, Cresta wrote: 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 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide menu items
Thanks, that worked a treat.
"Cresta" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA:programmatically invoking menu items from Excel Worksheet menu | Excel Programming | |||
Custom Menu and Menu Items | Excel Programming | |||
Pivot "row hide menu" keeps having items I don't have anymore!?!? | Excel Programming | |||
Pivot "row hide menu" keeps having items I don't have anymore!?!? | Excel Discussion (Misc queries) | |||
Menu items added with menu item editor in older versions | Excel Discussion (Misc queries) |