sintak buat bikin angka saja yang bisa diinputkan pake vb.6

vanszie

New member
Bantuin saya donk :)(sintak buat bikin angka saja yang bisa diinputkan pake vb.6https://indonesiaindonesia.com/images/smilies/nice/nod.gif
:)(
 
pake ini nih:
Private Sub Text2_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= Asc("0") & Chr(13) _
And KeyAscii <= Asc("9") & Chr(13) _
Or KeyAscii = vbKeyBack _
Or KeyAscii = vbKeyDelete _
Or KeyAscii = vbKeySpace) Then
Beep
KeyAscii = 0
End If
 
Back
Top