Is string allowable as a file name

J

JT

Hello

I am writing a version control macro and need it to identify whether
the file name entered by the user is valid as a file name. Can
anybody either:

a) provide some code that identifies whether a given text string is
allowable as a file name?

b) provide a list of all characters that are not allowable in file
names so that I can write such a piece of code myself.

Thanks

John
 
C

Charlie

And tildes "~" as I've recently discovered.

Jon Peltier said:
Google is your friend:

http://msdn2.microsoft.com/en-us/library/aa365247.aspx

In addition to the rules here, you'll find that for use in Excel, it is also
helpful to disallow [square brackets] and 'single quotes' from file names.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


JT said:
Hello

I am writing a version control macro and need it to identify whether
the file name entered by the user is valid as a file name. Can
anybody either:

a) provide some code that identifies whether a given text string is
allowable as a file name?

b) provide a list of all characters that are not allowable in file
names so that I can write such a piece of code myself.

Thanks

John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top