Private Sub Text1_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 48 To 57, 44, 46, 8 Case Else KeyAscii = 0 End SelectEnd Sub