Link to home
Start Free TrialLog in
Avatar of Anthony Matovu
Anthony MatovuFlag for Uganda

asked on

only numeric, backspace, delete key in a textbox vb6

I want to allow only numeric, backspace and the delete keys in my text box. I have not got the code for the backspace and delete key

for numeric i am using this code

private sub amount_keydown(keycode as integer, shift as integer)
 if keycode < 48 or keycode > 57 then
  keycode = 0
end if
end sub
SOLUTION
Avatar of quickcat88
quickcat88

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of openshac
openshac

Try using a Masked Edit control, might make things simpler?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial