ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   combo box value position instead of text? (https://www.excelbanter.com/excel-programming/397017-combo-box-value-position-instead-text.html)

[email protected]

combo box value position instead of text?
 
Is there a way to get a combobox object to give the position of the
item selected instead of the text. If I use combobox.value I just get
the text selected.

I have populated a combo box from a range of cells, and I would like
to know the cell that the text came from not the text itself.

Thanks,
David


JLGWhiz

combo box value position instead of text?
 
I don't know of a built in function to do that. You could probably write
some code to do it, since you know the range the combobox list comes from.
It is just a matter of tying the list index to the range array.

" wrote:

Is there a way to get a combobox object to give the position of the
item selected instead of the text. If I use combobox.value I just get
the text selected.

I have populated a combo box from a range of cells, and I would like
to know the cell that the text came from not the text itself.

Thanks,
David



[email protected]

combo box value position instead of text?
 
Thanks, that is what I figured. I know how to create the VBA to do
what I want; I just thought that it would have been an obvious built
in feature that I was over looking.

On Sep 6, 8:46 pm, JLGWhiz wrote:
I don't know of a built in function to do that. You could probably write
some code to do it, since you know the range the combobox list comes from.
It is just a matter of tying the list index to the range array.

" wrote:
Is there a way to get a combobox object to give the position of the
item selected instead of the text. If I use combobox.value I just get
the text selected.


I have populated a combo box from a range of cells, and I would like
to know the cell that the text came from not the text itself.


Thanks,
David




[email protected]

combo box value position instead of text?
 
I can get a range value using find for example:
Sheets("view
settings").Range("A8:A28").Find(reports_ComboBox.O bject.Value).Address

Is there some command to convert a range value such as $A$11 to a
numerical rows/columns number?

On Sep 6, 8:52 pm, "
wrote:
Thanks, that is what I figured. I know how to create the VBA to do
what I want; I just thought that it would have been an obvious built
in feature that I was over looking.

On Sep 6, 8:46 pm, JLGWhiz wrote:

I don't know of a built in function to do that. You could probably write
some code to do it, since you know the range the combobox list comes from.
It is just a matter of tying the list index to the range array.


" wrote:
Is there a way to get a combobox object to give the position of the
item selected instead of the text. If I use combobox.value I just get
the text selected.


I have populated a combo box from a range of cells, and I would like
to know the cell that the text came from not the text itself.


Thanks,
David




[email protected]

combo box value position instead of text?
 
range("$A$11).column and range("$A$11).row

On Sep 6, 9:04 pm, "
wrote:
I can get a range value using find for example:
Sheets("view
settings").Range("A8:A28").Find(reports_ComboBox.O bject.Value).Address

Is there some command to convert a range value such as $A$11 to a
numerical rows/columns number?

On Sep 6, 8:52 pm, "

wrote:
Thanks, that is what I figured. I know how to create the VBA to do
what I want; I just thought that it would have been an obvious built
in feature that I was over looking.


On Sep 6, 8:46 pm, JLGWhiz wrote:


I don't know of a built in function to do that. You could probably write
some code to do it, since you know the range the combobox list comes from.
It is just a matter of tying the list index to the range array.


" wrote:
Is there a way to get a combobox object to give the position of the
item selected instead of the text. If I use combobox.value I just get
the text selected.


I have populated a combo box from a range of cells, and I would like
to know the cell that the text came from not the text itself.


Thanks,
David





All times are GMT +1. The time now is 10:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com