VALIDATION FUNCTION HELP

  • Thread starter Thread starter KLZA
  • Start date Start date
K

KLZA

How can I use validation to stop users from entering the following
characters?: / \ : * ? " < > |
 
Restrict where?

This is code for a text box on a user form and allows specified ascii:

Private Sub TEXTBOXNAME_TextBox_KeyPress(ByVal KeyAscii As
MSForms.ReturnInteger)

Select Case KeyAscii
Case 48 To 57 ' 0 thru 9
Case 65 To 90 ' A thru Z uppercase. 97 to 122 is lowercase
Case Else
KeyAscii = 0
End Select

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top