Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 14973

[RESOLVED] Textbox accept only numbers, dots and slashes

$
0
0
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:
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

Viewing all articles
Browse latest Browse all 14973

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>