Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cannot click twice on custom menu in Excel | Excel Programming | |||
Double Click Custom Command Bar | Excel Programming | |||
Custom Right Click Menus - Inconsistent Functionality | Excel Programming | |||
Custom Right Click Menus - Inconsistent Functionality | Excel Discussion (Misc queries) | |||
custom right click menu | Excel Programming |