|
-
August 17th, 1999, 10:07 AM
#1
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!
-
August 17th, 1999, 10:45 AM
#2
Re: Numeric Value
Try using this:
Private Sub Command1_Click()
Dim strString As String
Dim intSpace As Integer
Dim intLength As Integer<br%2
-
August 17th, 1999, 10:53 AM
#3
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|