Click to See Complete Forum and Search --> : Mask without a mask


visual fzz
November 23rd, 1999, 11:07 AM
I want to use a TextBox where only numbers and letters can be put.
How can I do that?
Or how can I use the mask edit box???

Fzz

Aaron Young
November 23rd, 1999, 12:37 PM
If you don't want to use the Masked Edit Control, try something like:

private Sub Text1_Keypress(KeyAscii as Integer)
If InStr(1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 " & Chr(vbKeyBack), Chr(KeyAscii), vbTextCompare) = 0 then KeyAscii = 0
End Sub





Aaron Young
Analyst Programmer
adyoung@win.bright.net
aarony@redwingsoftware.com