Custom Right Click

S

Steven

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:=IDnum(N),
Recursive:=True).Enabled = True
Application.CommandBars("Cell").FindControl(ID:=IDnum(N),
Recursive:=True).Visible = True
On Error GoTo 0
Next N
End Sub
 
B

Bob Phillips

It's 2031 according to my Excel.

--
HTH

Bob

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top