Microsoft is conducting an online survey to understand your opinion of the Msdn Web site.If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
The following code will validate whether a filename is valid or whether it contains invalid characters or otherwise is not a valid directory. I want to make sure that the string typed in by a user is a valid windows filename. Can anyone point me to some classes that will help? There can be a whole lot of reasons for a file creation to fail.Can anyone point me to some classes that will help? Ideally, I guess I should create my own textbox class that only allows the typing of a valid filename. I doubt that you will come up with a stable solution. Look up the Exception's types that can be thrown by the File. This is useful if your code requires a user inputted filename.It will verify that the filename is valid before proceeding and possibly generating an error. Get Invalid Path Chars If In Str(name, bad Char) Stop searching for VBA code online.