Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is the code I used to remove the control, I get runtime error 5 'invalid
procedure call or argument'. Here is the code I used to remove the control: application.CommandBars("Worksheet Menu Bar").Controls("cmd").Delete This is the code I used to Add the control: Set cmd = Application.CommandBars("Worksheet Menu Bar").Controls.Add With cmd .BeginGroup = True .Caption = "myControl" .BeginGroup = True .OnAction = "Insert Macro Name Here" End With |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Give this a try...
application.CommandBars("Worksheet Menu Bar").Controls("myControl").Delete -- HTH... Jim Thomlinson "joe" wrote: This is the code I used to remove the control, I get runtime error 5 'invalid procedure call or argument'. Here is the code I used to remove the control: application.CommandBars("Worksheet Menu Bar").Controls("cmd").Delete This is the code I used to Add the control: Set cmd = Application.CommandBars("Worksheet Menu Bar").Controls.Add With cmd .BeginGroup = True .Caption = "myControl" .BeginGroup = True .OnAction = "Insert Macro Name Here" End With |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
[Excel'03] Cannot Remove System Monitor Control?! | Excel Discussion (Misc queries) | |||
How do you remove a check box (Control) in an Excel spreadsheet? | Excel Discussion (Misc queries) | |||
Can I remove a VBAProject under macro control? | Excel Programming | |||
Remove all items from an ActiveX control on a sheet | Excel Programming | |||
Remove calendar control | Excel Programming |