Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2008

Tip: Looking for answers? Try searching our database.

VALIDATION FUNCTION HELP

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
KLZA - 21 May 2008 17:34 GMT
How can I use validation to stop users from entering the following
characters?:  / \ : * ? " < > |
MacGuy - 21 May 2008 19:27 GMT
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

Signature

MacGuy

> How can I use validation to stop users from entering the following
> characters?:  / \ : * ? " < > |
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.