Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Turn off menu function

Anyone know the code to turn off a certain menu function, say "cut", under
the edit menu in a particular worksheet?

Thanks,

IP
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default Turn off menu function

In order to remove a command from the Menu, you need to now the control ID
For Example:
'This command will remove not really delete the Move or copy sheet from the

edit bar
ThisWorkbook.CommandBars("Edit").Controls(13).Dele te
'This command will disable the right click version of moving or copying the
sheet
Set modfctrl = CommandBars(35).FindControl(ID:=848)
With modfctrl
If .ID = 848 Then
.Enabled = False
End If
End With
To Restore into main edit bar do this:
Application.CommandBars("Edit").Controls.Add Type:=msoControlButton, ID:= _
848, Befo=13

To restore on right click:
Enabled = True

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"iperlovsky" wrote:

Anyone know the code to turn off a certain menu function, say "cut", under
the edit menu in a particular worksheet?

Thanks,

IP

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default Turn off menu function

Here is the link to the Control ID's
http://support.microsoft.com/default.aspx/kb/213552
--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Michael" wrote:

In order to remove a command from the Menu, you need to now the control ID
For Example:
'This command will remove not really delete the Move or copy sheet from the

edit bar
ThisWorkbook.CommandBars("Edit").Controls(13).Dele te
'This command will disable the right click version of moving or copying the
sheet
Set modfctrl = CommandBars(35).FindControl(ID:=848)
With modfctrl
If .ID = 848 Then
.Enabled = False
End If
End With
To Restore into main edit bar do this:
Application.CommandBars("Edit").Controls.Add Type:=msoControlButton, ID:= _
848, Befo=13

To restore on right click:
Enabled = True

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"iperlovsky" wrote:

Anyone know the code to turn off a certain menu function, say "cut", under
the edit menu in a particular worksheet?

Thanks,

IP

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
turn on right click menu in excel 2003 tatertatum Excel Worksheet Functions 1 September 3rd 09 12:36 AM
how do i turn on the tab over function nordog Excel Discussion (Misc queries) 3 May 5th 09 07:43 PM
How to turn a spreadsheet into a function? [email protected] Excel Worksheet Functions 1 December 13th 05 02:19 PM
Does anyone know how to turn off the GetPivotData function? Ron Coderre Excel Worksheet Functions 1 November 16th 05 06:30 PM
Turn off menu options with vba nath Excel Programming 1 August 10th 04 05:44 PM


All times are GMT +1. The time now is 02:12 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"