x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

Need help with eVB

stingraze Page Icon Posted 2006-04-04 5:48 AM
#
Avatar image of stingraze
Subscribers
H/PC Vanguard

Posts:
3,685
Location:
Japan
Status:
Hi. I'm developing a app that converts units (like cm to in.) with eVB, but I'm having problems with combobox.

I want users to select to select units in the combobox, and that makes it change the variable of the multiplier according to the selected combobox's value.

Something that goes like:

If combobox1value = "cm" and combobox2value = "in" Then
multiplier = 2.54
End If

The problem is that I can't get to have the combobox value into a variable.


So far, I've written a little more than


Private Sub Form_Load()
Combo1.AddItem "cm"
Combo1.AddItem "m"
Combo1.AddItem "km"
Combo1.AddItem "sq. cm"
Combo1.AddItem "sq. m"
Combo1.AddItem "hectares"
Combo1.AddItem "cubic m"
Combo1.AddItem "L"
Combo1.AddItem "Newton m"
End Sub


 Top of the page
abyssknight
abyssknight Page Icon Posted 2006-04-04 9:06 AM
#
Status:
When I wrote my little program, I just used the index of the option. I'm not sure if you can just get the value, but the index always worked for me.
 Top of the page
stingraze Page Icon Posted 2006-04-04 9:27 PM
#
Avatar image of stingraze
Subscribers
H/PC Vanguard

Posts:
3,685
Location:
Japan
Status:
ahh... I see thanks a lot!

I tested with a simple program

Private Sub Command1_Click()
If Combo1.ListIndex = "1" Then
MsgBox "YES"
End If
End Sub

and it worked okay.

Edited by stingraze 2006-04-04 9:30 PM
 Top of the page
Jump to forum:
Seconds to generate: 0.859 - Cached queries : 60 - Executed queries : 8