-
Hi i'm trying to create a conversion program for use at work. I have eight text boxes for various linear measurements. If I type in 10 in the inches text box, and then click on the calculate button I want the other seven text boxes to give the figure in their respective outputs e.g. millimeters, yards etc. What I want to know is how will the program know which text box to base the calculations on.
thanks in advance
MICK
-
You can use a Select Case like this :)
Code:
Private Sub Command1_Click()
Select Case True
Case Text1.Text <> "" ' Data entered in Text1
' Code to convert data
Case Text2.Text <> "" ' Data entered in Text2
' Code to convert data
Case Else ' No data entered
End Select
End Sub
[This message has been edited by bsmith (edited 01-31-2000).]
-
You might try to use the got focus event or textbox change event to trigger the results in the other text boxes. I hope this is what you meant.