AlexD
04-06-2003, 09:59 AM
HI
the next code works to add a standar combobox in
my own toolbar
Dim CB As CommandBar
Dim CB_TEST As CommandBarComboBox
Set CB = Application.CommandBars.Add(Name:="MyToolBar", _
temporary:=False, Position:=msoBarTop)
Set CB_TEST = CB.Controls.Add(Type:=msoControlDropDown)
Yeah this works ok
But when i try to do the the same procedure to create a
Drop down button control like the fill color or font color at excel
i changed the type param to msoControlButtonDropdown
But doesnt work CB_TEST goes to NULL
The funny thing itīs that microsoft documentation explain that
a combobox type could be msoControlButtonDropdown, be dont
say that could be created as msoControlButtonDropdown in the Add method.
Type property is readonly so the only way to change it is at
Add method
can someone help me please
thanks
the next code works to add a standar combobox in
my own toolbar
Dim CB As CommandBar
Dim CB_TEST As CommandBarComboBox
Set CB = Application.CommandBars.Add(Name:="MyToolBar", _
temporary:=False, Position:=msoBarTop)
Set CB_TEST = CB.Controls.Add(Type:=msoControlDropDown)
Yeah this works ok
But when i try to do the the same procedure to create a
Drop down button control like the fill color or font color at excel
i changed the type param to msoControlButtonDropdown
But doesnt work CB_TEST goes to NULL
The funny thing itīs that microsoft documentation explain that
a combobox type could be msoControlButtonDropdown, be dont
say that could be created as msoControlButtonDropdown in the Add method.
Type property is readonly so the only way to change it is at
Add method
can someone help me please
thanks