Search Tools Links Login

Only allow numbers in textboxes


Visual Basic 6, or VB Classic

Stops letters from being typed in a textbox

Original Author: Webmonster

Code

This will stop letters being put in a textbox named text1
private sub text1_keypress(keyascii as integer)
select case keyascil
case is < 42
case 48 To 57
case else
keyascil = 0
end select
end sub

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 108 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.