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