Hello,
I have a text box where I want the user to input an answer.
Private Sub txtanswer_Change()
if txtanswer.text="hello" then end
End Sub
now the problem is that as soon as you press a key the program would end. I want the program to end when you have typed hello and pressed the enter key.
I got it to work with a command box but I would like it to work by pressing the enter key.
I understand that it has something to do with "txtanswer_change" but I couldn't see an alternitive.
I also got my program to work with an input box, but i really would like to use a text box.
cheers,
neil
I have a text box where I want the user to input an answer.
Private Sub txtanswer_Change()
if txtanswer.text="hello" then end
End Sub
now the problem is that as soon as you press a key the program would end. I want the program to end when you have typed hello and pressed the enter key.
I got it to work with a command box but I would like it to work by pressing the enter key.
I understand that it has something to do with "txtanswer_change" but I couldn't see an alternitive.
I also got my program to work with an input box, but i really would like to use a text box.
cheers,
neil