Private Sub Text1_Change() If Len(Text1.Text) 1 Then Text1.SelText "." End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 8 Then Exit Sub If Len(Text1.Text) 1 Then Text1.SelText "." End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 8 Then Exit Sub If Not IsNumeric(Chr(KeyAscii)) Then KeyAscii = 0 Select Case Len(Text1.Text) Case 1 Text1.SelText = "." Case Else If Chr(KeyAscii) "." Then KeyAscii 0 End Select End Sub
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question