Sjaaksken
asked on
textbox: add text to listbox when the enter key is pressed
Hi,
I have a reasonably easy question but can't seem to get it right:
I have a textbox in my form (textBox1), when the enter key is pressed it should enter the text in the textbox in a listbox(listBox1)
How can i make it enter the text in the listbox (once for every enter pressed)?
I have a reasonably easy question but can't seem to get it right:
I have a textbox in my form (textBox1), when the enter key is pressed it should enter the text in the textbox in a listbox(listBox1)
How can i make it enter the text in the listbox (once for every enter pressed)?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I think you solved the problem. If you still have problems, just let me know.
Regards,
Bruce
Regards,
Bruce
ASKER
apparently I was close but when I did paste your solution and ran the program it didn't enter the text when the enter key was pressed. I tried assigning other keys to the 'if' statement but same result.
Am I forgetting something? It also doesn't clear the textbox as it doesnt seem to accept the enter action