Results 1 to 6 of 6

Thread: VB>NET : Allow a Textbox only to Accept Numeric [SOLVED]

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2002
    Posts
    6

    Question VB>NET : Allow a Textbox only to Accept Numeric [SOLVED]

    Hi all

    Does anyone know how to Allow a User only to Type numeric characters only into a textbox.

    I know in VB6 you could catch the char and set it to '0' if not valid
    Code:
    If not KeyAscii = '27' then
    Code:
    keyascii = 0
    Code:
    End If
    But how do you make it work in VB.NET ?

    I have tried adding the Numberbox control to my app but somehow I get errors with this control when exiting the App
    Last edited by StaticInc; Nov 27th, 2003 at 04:38 AM.
    'When all esle fails
    On Error Resume Next

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width