Cara Input Huruf Dan Angka Saja Di Textbox Vb 6.0



Buatlah Form Seperti Dibawah Ini:
Memuat foto
Klik Dua Kali Pada Textbox1 Dan Masuklah Listing Dibawah Ini:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= Asc("0") _
   And KeyAscii <= Asc("9") _
   Or KeyAscii = vbKeyBack) Then
   Beep
   KeyAscii = 0
End If
End Sub

Klik Dua Kali Pada Textbox2  Dan Masuklah Listing Dibawah Ini:
Private Sub Text2_KeyPress(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
Beep
KeyAscii = 0
End If
End Sub
Coba Anda Jalankan Program Dengan Menekan F5


Program ini dibuat oleh Heri Afrizal di bireuen

Popular posts from this blog

Cara Merangsang Klitoris Wanita

Membuat nomor urut secara otomatis pada database MySQL menggunakan php