Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Steven
 
Posts: n/a
Default Alternate Menu Shortcut

When I right click my mouse I get a long menu list on a popup which shows
next to the the current active cell. There are too many items on this popup.
Is there a way a can make it so only the Copy and Paste show up on this list.

Thank you for your help.

Steven
  #2   Report Post  
Ron de Bruin
 
Posts: n/a
Default Alternate Menu Shortcut

Yes this is possible

You can run this macro (not possible manual)

Sub Change_Cell_Menu()
Dim IDnum As Variant
Dim N As Integer
Dim Ctl As CommandBarControl

'Set Enabled to False for all the controls
For Each Ctl In CommandBars("Cell").Controls
On Error Resume Next
Ctl.Enabled = False
On Error GoTo 0
Next Ctl

'Now set Enabled to True for the controls you want
IDnum = Array("22", "19")
For N = LBound(IDnum) To UBound(IDnum)
On Error Resume Next
Application.CommandBars("Cell").FindControl(ID:=ID num(N), _
Recursive:=True).Enabled = True
On Error GoTo 0
Next N
End Sub

Sub All_Cell_Menu_Controls_Enabled_True()
'Set Enabled to True for all the controls in the Cell menu
Dim Ctl As CommandBarControl
For Each Ctl In CommandBars("Cell").Controls
On Error Resume Next
Ctl.Enabled = True
On Error GoTo 0
Next Ctl
End Sub

See also
http://www.rondebruin.com/menuid.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Steven" wrote in message ...
When I right click my mouse I get a long menu list on a popup which shows
next to the the current active cell. There are too many items on this popup.
Is there a way a can make it so only the Copy and Paste show up on this list.

Thank you for your help.

Steven



  #3   Report Post  
Steven
 
Posts: n/a
Default Alternate Menu Shortcut

Ron,

This is really nice. I also included a Ctl.Visible = False which caused no
items to appear in the menu. What do I do so I see only the Copy and Paste
commands in the menu.

Thank you,

Steven
  #4   Report Post  
Ron de Bruin
 
Posts: n/a
Default Alternate Menu Shortcut

Use this then

Sub Change_Cell_Menu()
Dim IDnum As Variant
Dim N As Integer
Dim Ctl As CommandBarControl

'Set Enabled to False for all the controls
For Each Ctl In CommandBars("Cell").Controls
On Error Resume Next
Ctl.Visible = False
On Error GoTo 0
Next Ctl

'Now set Enabled to True for the controls you want
IDnum = Array("22", "19")
For N = LBound(IDnum) To UBound(IDnum)
On Error Resume Next
Application.CommandBars("Cell").FindControl(ID:=ID num(N), _
Recursive:=True).Visible = True
On Error GoTo 0
Next N
End Sub

Sub All_Cell_Menu_Controls_Visible _True()
'Set Enabled to True for all the controls in the Cell menu
Dim Ctl As CommandBarControl
For Each Ctl In CommandBars("Cell").Controls
On Error Resume Next
Ctl.Visible = True
On Error GoTo 0
Next Ctl
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Steven" wrote in message ...
Ron,

This is really nice. I also included a Ctl.Visible = False which caused no
items to appear in the menu. What do I do so I see only the Copy and Paste
commands in the menu.

Thank you,

Steven



  #5   Report Post  
Steven
 
Posts: n/a
Default Alternate Menu Shortcut

Ron,

I figured it out looking at your website. I dont understand it but it works
and it is very helpful.

Thanks a bunch.

Steven


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
What is a shortcut menu? Jeffry Excel Discussion (Misc queries) 4 May 4th 09 04:03 PM
how can you customize a shortcut menu in excel? fredk Excel Discussion (Misc queries) 2 March 25th 05 04:25 AM
Enabling shortcut menu Slypaw Excel Discussion (Misc queries) 3 March 16th 05 12:37 AM
Shortcut menu does not have hyperlink on it Kelli Excel Discussion (Misc queries) 2 February 24th 05 06:59 PM
How can the right-click shortcut menu in Excel be edited? LynneN Excel Discussion (Misc queries) 10 January 31st 05 11:43 PM


All times are GMT +1. The time now is 09:13 AM.

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

About Us

"It's about Microsoft Excel"