Hello VbForums
Thank you for the help you are providing.
Today I'm stuck.
I want a textbox to accept only numbers, dots and slashes "/ " and maybe colons ":"
For accepting only numbers I have this code:
Private Sub Text2_Change()
If Len(Text2.Text) > 0 Then
If Not IsNumeric(Right(Text2.Text, 1)) Then
Text2.Text = Mid(Text2.Text, 1, Len(Text2.Text) - 1)
Text2.SelStart = Len(Text2.Text)
End If
End If
End Sub
Thank you for the help you are providing.
Today I'm stuck.
I want a textbox to accept only numbers, dots and slashes "/ " and maybe colons ":"
For accepting only numbers I have this code:
Quote:
Private Sub Text2_Change()
If Len(Text2.Text) > 0 Then
If Not IsNumeric(Right(Text2.Text, 1)) Then
Text2.Text = Mid(Text2.Text, 1, Len(Text2.Text) - 1)
Text2.SelStart = Len(Text2.Text)
End If
End If
End Sub