-
Numeric Value
I have a ComboBox with names and codes. For example:
Brazil 1
USA 2
Italy 3
...
I want to take just the number to each item.
I have used the Val function, but this work just when the number is first. For example: 1 Brazil.
What can I do?
Thanks in advance!
-
Re: Numeric Value
Try using this:
Private Sub Command1_Click()
Dim strString As String
Dim intSpace As Integer
Dim intLength As Integer<br%2
-
Re: Numeric Value
I suggest you use the Itemdata property of the combobox.
cmb.additem "brasil"
cmd.itemdata(cmd.newindex) = 1
and so on
That way you can easily extract the numbers by just accesssing the itemdata-property of the current item.