A couple of msoComboLabels (populated using .AddItem()) in my CommandBar are supposed to *remember* the values the user has chosen, so the next time he/she encounters that ComboBox already displays the last choice.
This is no problem as long as I am working with a fixed number of items. Saving the .ListIndex and reseting it that value does the job.
Unfortunately I also have Combo Boxes with a FLEXIBLE NUMBER (and ORDER!) of items; so using .ListIndex does not work here.
I would need another way to locate and reset to that item.
- The property .Text can be read (so I can *remember* it), but I can not SET it (Error 438)!
- I was thinking about maybe cycling through all available Items - comparing with the remembered .Text, so I get the proper .ListIndex. However I don't even find a way to do so (was hoping for some CommandBarControl.ITEMS
.TEXT or similar)...
I was looking over all the Web, but it looks like nobody has worked this "way" with CommandBars; maybe someone here has any experience?
This is no problem as long as I am working with a fixed number of items. Saving the .ListIndex and reseting it that value does the job.
Unfortunately I also have Combo Boxes with a FLEXIBLE NUMBER (and ORDER!) of items; so using .ListIndex does not work here.
I would need another way to locate and reset to that item.
- The property .Text can be read (so I can *remember* it), but I can not SET it (Error 438)!
- I was thinking about maybe cycling through all available Items - comparing with the remembered .Text, so I get the proper .ListIndex. However I don't even find a way to do so (was hoping for some CommandBarControl.ITEMS
I was looking over all the Web, but it looks like nobody has worked this "way" with CommandBars; maybe someone here has any experience?