Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Yep.
I'm assuming that the combobox is still on that userform. If that's correct, take a look at the .listindex property of the combobox. Option Explicit Private Sub CommandButton1_Click() MsgBox Me.ComboBox1.ListIndex End Sub The first item on the list will have an index of 0, so... Option Explicit Private Sub CommandButton1_Click() MsgBox Me.ComboBox1.ListIndex + 1 End Sub If you have something weirder(?) happening, you could always build a table on another worksheet and use =vlookup() to get the number you want. trav wrote: THANKS, that works pretty nice. just one more question, in a combo box, is it possible to have a name that is different then the value. so if i have a drop down list, say company quantity unit price sale can i have a different value associated with them like company = 1 quantity = 2 unit price = 3 sale = 4 and if so, how do i set that in the form. -- trav ------------------------------------------------------------------------ trav's Profile: http://www.excelforum.com/member.php...o&userid=31420 View this thread: http://www.excelforum.com/showthread...hreadid=514461 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
converting text to negative numbers! | Excel Worksheet Functions | |||
converting numbers to text | New Users to Excel | |||
Converting negative/positive numbers to a CSV (Comma-delimited .TX | Excel Worksheet Functions | |||
Converting numbers formatted as text to numbers | Excel Discussion (Misc queries) | |||
How do I sort letters before numbers in Excel? | Excel Discussion (Misc queries) |