ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VALIDATION FUNCTION HELP (https://www.excelbanter.com/excel-programming/411306-validation-function-help.html)

KLZA

VALIDATION FUNCTION HELP
 
How can I use validation to stop users from entering the following
characters?: / \ : * ? " < |

MacGuy

VALIDATION FUNCTION HELP
 
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

--
MacGuy


"KLZA" wrote:

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



All times are GMT +1. The time now is 01:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com