prosedur :
Public Sub HanyaHuruf(ByRef KeyAscii As Integer)
If Not (KeyAscii >= Asc("a") & Chr(13) And KeyAscii <= Asc("z") & Chr(13) Or (KeyAscii >= Asc("A") & Chr(13) And KeyAscii <= Asc("Z") & Chr(13) Or KeyAscii = vbKeyBack Or KeyAscii = vbKeyDelete Or KeyAscii = vbKeySpace)) Then
KeyAscii = 0
End If
End Sub
cara memanggilnya pada textbox yang telah dibuat pada form di Visual Basic 6
Private Sub Text2_KeyPress(KeyAscii As Integer)
HanyaHuruf KeyAscii
End Sub
demikian ilmu membatasi hanya huruf pada textbox VB6 yang saya sharingkan, semoga bermanfaat bagi pembaca sekalian.
Post a Comment
This blog needed you to understand the word spam - never spam on this blog, although i will not moderate all of it, but you will learn it yourself, educate yourself