Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to customize the shapes commandbar on a
worksheet activation and continually get an error when I attempt to delete the format object... item from the menu. "Invalid procedure call or argument" This is a one time error message and then it seems to disappear any other times I access the worksheet while the workbook is open. Does anyone have any insight into this as it is becoming very frustrating. David Private Sub Worksheet_Activate() Application.CommandBars("Shapes").Reset Application.CommandBars("Shapes").Enabled = True Application.OnKey "^x", "CompDelete" Application.OnKey "{delete}", "CompDelete" Application.OnKey "{insert}", "CompInsert" With Application.CommandBars("Shapes") .Controls.Add(Type:=msoControlButton, Befo=1).Caption = "Insert Picture" .Controls("Insert Picture").OnAction = "CompInsert" .Controls("Insert Picture").FaceId = 295 .Controls.Add(Type:=msoControlButton, Befo=1).Caption = "Delete Picture" .Controls("Delete Picture").OnAction = "CompDelete" .Controls("Delete Picture").FaceId = 292 .Controls("Format Object...").Delete .Controls("Cut").Delete .Controls("Paste").Delete .Controls("Copy").Delete .Controls("Grouping").Delete .Controls("Order").Delete .Controls("Assign Macro...").Delete .Controls("Set Autoshape Defaults").Delete .Controls("Hyperlink...").Delete End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
commandbar problems | Excel Discussion (Misc queries) | |||
Add-In needs to create CommandBar | Excel Programming | |||
commandbar | Excel Programming | |||
commandbar hunt | Excel Programming | |||
Moving CommandBar using VBA or C# | Excel Programming |