Sunday, September 6, 2009
Syntak utuk inputin di textbox dengan karakter angka :
---------------------------------------------------------
Private Sub Text1_KeyPress(KeyAscii As Integer)
If Not (KeyAscii <= Asc("9") And KeyAscii >= Asc("0") Or KeyAscii = vbKeyBack) Then
KeyAscii = 0
End If
End Sub
======&&&&=======
Syntak utuk inputin di textbox dengan karakter huruf:
---------------------------------------------------------
Private Sub Text2_KeyPress(KeyAscii As Integer)
If Not (KeyAscii <= 122 And KeyAscii >= 65 Or KeyAscii = vbKeyBack) Then
KeyAscii = 0
End If
End Sub
---------------------------------------------------------
Private Sub Text1_KeyPress(KeyAscii As Integer)
If Not (KeyAscii <= Asc("9") And KeyAscii >= Asc("0") Or KeyAscii = vbKeyBack) Then
KeyAscii = 0
End If
End Sub
======&&&&=======
Syntak utuk inputin di textbox dengan karakter huruf:
---------------------------------------------------------
Private Sub Text2_KeyPress(KeyAscii As Integer)
If Not (KeyAscii <= 122 And KeyAscii >= 65 Or KeyAscii = vbKeyBack) Then
KeyAscii = 0
End If
End Sub
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment