1

Topic: How to transfer Index in Combobox on Ribbon

Kind day to all readers smile
In book Excel 2010 there is a pair , their list is formed through xml.
It would be desirable to appropriate at loading by it any value. If to use getText value is visible but when I stick on  , the list opens also any record is not selected. I.e. assignment of the text of a combo does not mean passage to certain item.
It would be desirable to appropriate nevertheless at loading Ribbon-a it Index certain value. Attempts to work with getItemID somehow did not crown success...

2

Re: How to transfer Index in Combobox on Ribbon

, it is somehow not clearly written...
Still attempt.
So: there is Ribbon, on it 2 . At discovery of the book it would be desirable, that at  there was a starting value.
There is a semi-working variant - to appropriate a certain value to property Text. BUT! Then record, i.e. item it is not selected.
How to make so that it was possible to select Item at everyone , corresponding to value by default?
If tomorrow answers are not, it is necessary to write the third version of the text big_smile

3

Re: How to transfer Index in Combobox on Ribbon

JustNick wrote:

If tomorrow answers will not be, it is necessary to write the third version of the text

It is threat? smile
There is such function of a reverse call: getSelectedItemID. It also should be used.
I.e. at you memberwise the list the is assigned Id:

<item id = "id_1"..../>

And for the list there is a parameter getSelectedItemID
Assign for it a procedure call:

getSelectedItemID = "get_id"

And further already in VBA create this procedure:

Sub get_id (control As IRibbonControl)
get_id = "id_1"
End Sub

The general principle such.

4

Re: How to transfer Index in Combobox on Ribbon

The_Prist wrote:

It is threat? smile

It is cry from the heart big_smile

The_Prist wrote:

There is such function of a reverse call: getSelectedItemID. It also should be used.

Already tried to use and it, but Ribbon XML Editor swears that the attribute "getSelectedItemID" for an element "comboBox" is not defined in DTD and the circuit.
Error picture I apply

5

Re: How to transfer Index in Combobox on Ribbon

JustNick;
What hinders to use not combobox, and dropDown?

6

Re: How to transfer Index in Combobox on Ribbon

The_Prist;
As it was clarified, nothing hindered to use dropDown. So all earned, for what many thanks!!!