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
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