Minggu, 13 November 2011

Validasi Visual Basic hanya input angka dan huruf

Public Sub AlphaNumericValid(KeyAscii As Integer)
Const Character = "0123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz "
If KeyAscii <> 8 And KeyAscii <> 13 Then
   If InStr(Character, Chr(KeyAscii)) = 0 Then
      KeyAscii = 0
      Exit Sub
   End If
End If
End Sub

0 komentar:

Posting Komentar

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Best Buy Coupons