Test your skills
I have a textbox that will accept the quantity of products ordered.
It should allow only numbers.
Your code does the job. But if the user input is not number, the whole text is erased. what I want is that the textbox will not allow other keys except numbers and still not remove previous numbers inputted by the user.
Aside from the is numeric function, you can also use the keypress. follow this code and give it a try
Private Sub Text1_KeyPress(KeyAscii as Integer)
If KeyAscii = 45 then goto EndProc
'If Key pressed is not numeric then make key Null
If (KeyAscii < 48) or (Keyascii >57) then KeyAscii = 0
That's a nice idea Mr Techgeek.. That textbox will look more professional using your code..
Thanks for the knowledge you've shared with me. It can help a lot for my project. thanks again.
You're always welcome.. feel free to ask here in techyv if you have problems.
A lot of expert here will help you..