IvanCodin Posted January 27, 2008 Share Posted January 27, 2008 Is ther any way in an input box to limit the characters that can be input. Do $strName = InputBox("Input","Enter all or part of a company name to search for:",""," M") Until $strName <> "" ; MsgBox(0,"Info", "You entered " & $strname, 8) I want the user to input characters only. Me Link to comment Share on other sites More sharing options...
covaks Posted January 27, 2008 Share Posted January 27, 2008 (edited) Assuming by "characters only" you mean, Letters a-z and A-Z. Do $strName = InputBox("Input","Enter all or part of a company name to search for:",""," M") Until StringRegExp($strName,"^[a-zA-Z]+$") If you want 0-9 as well, just change [a-zA-Z] to [a-zA-Z0-9] etc. Edited January 27, 2008 by covaks Link to comment Share on other sites More sharing options...
IvanCodin Posted January 27, 2008 Author Share Posted January 27, 2008 Thanks! I was looking at the Help file but did see this. Me Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now