Textboxes and Numbers

  • Thread starter Thread starter Michael Turner
  • Start date Start date
M

Michael Turner

What is the easiest way to check if the key pressed in a textbox is numeric.
 
Hi,
In the KeyPress event of the TextBox, do: IsNumeric(e.KeyChar)

What is the easiest way to check if the key pressed in a textbox is numeric.
 
Sure. In the KeyDown event, have IsNumeric(Chr(e.KeyValue))

I need to have this done on the keydown event any ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top