Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

text input querie

Status
Not open for further replies.

orisons

Programmer
Feb 18, 2002
49
CA
I have two text boxes that require user input now if a value of 0 is put into one box then the other is not needed what I would like to do is when a value greater than 0 is put into the first box the second will enable(I have the second unenabled at startup)do I need to declare the textbox input as a variable if so would this be the proper way
score1 = txt1.text
oh yes I forgot these inputs are only numbers (the first set to two decimal places the second whole numbers)
I have assured it is only numbers in these boxes by using
Select Case KeyAscii
Case 8, 46, 48 To 57
Case Else
KeyAscii = 0
oh yes just in case you didnt notice I am a complete novice
thanks
 
Private Sub Text1_Change()
If Text1.Text > "0" Then
Text2.Enabled = True
End If
End Sub Swi
 
Private Sub Text1_Change()
If Text1.Text > "0" Then
Text2.Enabled = True
Else
Text2.Enabled = False
End If
End Sub Swi
 
Take the quotes off from around the 0 to make this work correctly. Sorry about that. Swi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top