controlling the input into a textbox

From: Massy (anonymous_at_discussions.microsoft.com)
Date: 02/23/04


Date: Mon, 23 Feb 2004 05:11:05 -0800

Does anyone know how can ensure that the only input that is accepted into a textbox is a numeric (only digits 1-9 accepted)?

Is this possible?

I am using vb.net to create a windows app.

thx folks



Relevant Pages

  • Re: Required Field for 7 Numeric digits only
    ... using code only in the KeyPress event will not prevent a user from using Copy/Paste to place any text they want into the TextBox. ... Private Sub TextBox1_KeyPress ... MsgBox "Please enter Accounting Unit Code (7 Digits)" ... Dim IsValid As Boolean ...
    (microsoft.public.excel.programming)
  • Re: Required Field for 7 Numeric digits only
    ... Copy/Pasting non-digits into the TextBox. ... Private Sub TextBox1_KeyPress ... MsgBox "Please enter Accounting Unit Code (7 Digits)" ... Dim IsValid As Boolean ...
    (microsoft.public.excel.programming)
  • RE: Required Field for 7 Numeric digits only
    ... MsgBox "Please enter Accounting Unit Code (7 Digits)" ... Dim IsValid As Boolean ... ' Checking if TextBox value is 7 digits and all the contents are numeric ... "Malik" wrote: ...
    (microsoft.public.excel.programming)
  • Re: Required Field for 7 Numeric digits only
    ... Copy/Pasting non-digits into the TextBox (and I am pretty sure what they ... Private Sub TextBox1_KeyPress ... MsgBox "Please enter Accounting Unit Code (7 Digits)" ... Dim IsValid As Boolean ...
    (microsoft.public.excel.programming)
  • Re: Required Field for 7 Numeric digits only
    ... we are using for this particular textbox. ... that they have 7 numeric digits entered. ... Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) ...
    (microsoft.public.excel.programming)