Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 76
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA:programmatically invoking menu items from Excel Worksheet menu morse100 Excel Programming 15 October 29th 10 07:29 PM
Custom Menu and Menu Items Steve[_91_] Excel Programming 4 August 16th 07 02:15 AM
Pivot "row hide menu" keeps having items I don't have anymore!?!? [email protected] Excel Programming 4 January 8th 07 09:22 PM
Pivot "row hide menu" keeps having items I don't have anymore!?!? [email protected] Excel Discussion (Misc queries) 6 January 4th 07 11:27 PM
Menu items added with menu item editor in older versions Michael Hoffmann Excel Discussion (Misc queries) 2 January 7th 05 01:40 PM


All times are GMT +1. The time now is 10:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"