Editing a command bar

arage

Registered User.
Local time
Today, 17:42
Joined
Dec 30, 2000
Messages
537
Editing a command bar
I’m having a hard time deleting objects like a combo box from a command bar. I constantly wind up adding to it rather than deleting from it.

I have macros that were designed to do both adding & deleting but nothing works for the delete part right now.

I get a “Named argument not found” error on the SET statement below. Please advise.

'delete combo boxes from "Filter Toolbar"
Function deleteCombo()

Dim arg1 As CommandBarControl

Set arg1 = CommandBars("Filter Toolbar").Controls(Type:=msoControlComboBox)
arg1.Delete

End Function
 

Users who are viewing this thread

Back
Top Bottom