|
-
February 3rd, 2003, 09:47 AM
#1
I want to be able to write juste numbers in a textbox
Hi
In one of my textbox, the only thing i want that the user can write is a number. Anything else have to be bloc. I thought to return bakcspace if the user write a letter or something else, but i don't know how. Is anybody knows it?
here's my code
Dim intKeyAscii As Int32
intKeyAscii = Asc(e.KeyChar)
txtDateComptable.Text = ""
txtNoReference.Text = ""
If intKeyAscii = 13 Then
Me.btnTrouver_Click(Me, e)
ElseIf (intKeyAscii < 48 Or intKeyAscii > 57) then
'return backspace
End If
Thanks
Alexandre
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|