Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default Custom Right Click

I thought 1589 below was Insert Comment. The others show on the right click
but not the Insert Comment?

Thank you,

Steven

Sub RemoveRightClick()
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
Ctl.Visible = False
On Error GoTo 0
Next Ctl

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Custom Right Click

It's 2031 according to my Excel.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Steven" wrote in message
...
I thought 1589 below was Insert Comment. The others show on the right
click
but not the Insert Comment?

Thank you,

Steven

Sub RemoveRightClick()
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
Ctl.Visible = False
On Error GoTo 0
Next Ctl

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



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
Cannot click twice on custom menu in Excel Gerry Excel Programming 0 September 7th 07 01:06 AM
Double Click Custom Command Bar Cory Excel Programming 2 May 30th 07 08:56 PM
Custom Right Click Menus - Inconsistent Functionality Lee Excel Programming 4 February 4th 07 03:28 AM
Custom Right Click Menus - Inconsistent Functionality Lee Excel Discussion (Misc queries) 1 February 3rd 07 03:41 AM
custom right click menu Father of 7 Excel Programming 1 January 27th 05 01:43 PM


All times are GMT +1. The time now is 02:23 PM.

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"