Coco_Nutty
Jan 25th, 2000, 06:36 AM
Private Sub Form_Load()
txtTwo.Visible = False
lblTwo.Visible = False
txtOne.Text = ""
lblOne.Caption = "Place entry here"
End Sub
Sub txtOne_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtTwo.Visible = True
lblTwo.Visible = True
txtOne.Visible = False
lblOne.Visible = False
lblTwo.Caption = "Now place entry here"
SendKeys "{tab}"
KeyAscii = 0
End If
End Sub
Sub txtTwo_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtTwo.Visible = False
lblTwo.Visible = False
txtOne.Visible = True
lblOne.Visible = True
lblOne.Caption = "Now place entry here"
SendKeys "{tab}"
KeyAscii = 0
End If
End Sub
This is my first time programing in vb. The above mess makes a label and a texbox appear . How would you suggest I do this using Gotfocus.
txtTwo.Visible = False
lblTwo.Visible = False
txtOne.Text = ""
lblOne.Caption = "Place entry here"
End Sub
Sub txtOne_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtTwo.Visible = True
lblTwo.Visible = True
txtOne.Visible = False
lblOne.Visible = False
lblTwo.Caption = "Now place entry here"
SendKeys "{tab}"
KeyAscii = 0
End If
End Sub
Sub txtTwo_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtTwo.Visible = False
lblTwo.Visible = False
txtOne.Visible = True
lblOne.Visible = True
lblOne.Caption = "Now place entry here"
SendKeys "{tab}"
KeyAscii = 0
End If
End Sub
This is my first time programing in vb. The above mess makes a label and a texbox appear . How would you suggest I do this using Gotfocus.