Try this.
Code:Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii < 48 Or KeyAscii > 57 Then KeyAscii = 0 If Len(Text1) = 2 Then Text1.SelText = "-" End Sub
|
Results 1 to 9 of 9
Threaded View
|
Click Here to Expand Forum to Full Width |