Membuat text1.text Hanya Dapat Diisi dengan Angka vb6.0


langsung saja tanpa basa basi berikut kodenya:

.
Private Sub Text1_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= Asc(“0”) And KeyAscii <= Asc(“9”) Or KeyAscii = vbKeyBack) Then KeyAscii = 0
End Sub

.

maka ketika text1.text diisi selain angka maka tidak akan muncul.

2 thoughts on “Membuat text1.text Hanya Dapat Diisi dengan Angka vb6.0

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s