Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Restore "Delete..." and "Insert..." shortcuts
Hello,
I am using this code to disable insertion and deletion of rows/columns: Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean) Dim cBut As CommandBarControl Dim iPostion As Integer On Error Resume Next Application.CommandBars("Cell").Controls("CLEAR ALL").Delete With Application.CommandBars("Cell") iPostion = .Controls("Delete...").Index Set cBut = .Controls.Add(Befo=iPostion, Temporary:=True) .Controls("Delete...").Delete .Controls("insert...").Delete With cBut .Caption = "CLEAR ALL" .OnAction = "ClearAll" End With End With On Error GoTo 0 End Sub I need to restore these to the shortcut menu when the application closes. I can not seem to get the syntax right. Please help? Thanks, -- Markb |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
Lost "File Menu" - now it's "Edit / View / Insert.." but no "F | Excel Discussion (Misc queries) | |||
Insert "-" in text "1234567890" to have a output like this"123-456-7890" | Excel Discussion (Misc queries) | |||
save and restore "Workbook Menu Bar" & "Cell" menus | Excel Programming | |||
Adding "New" "Insert" "Delete" into a workbook to change from data 1 to data 2 etc | Excel Programming |