View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default preventing input of illegal characters in an inputbox

You can't prevent illegal characters in the input box. You'll
have to loop through the result of the InputBox testing each
character against a list of illegal characters.





"drofnats" wrote in message
...
Still a little new at vba. Can someone tell me how to
prevent someone from entering in spaces or any illegal
characters (like & % @ etc) into an InputBox? At least
without writing a whole lot of "ElseIf" statements?

I have my script so it so names the range as whatever they
type. That's why I need to restrict entries. Thanks.