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