Naming convention for workbook names
Can someone direct me to the naming convention for workbook names. What is
allowed and what is not? I want to suggest some workbook names for a SAVEAS and want to avoid traps because of the convention. Thanks, Barb Reinhardt |
Naming convention for workbook names
Avoid /\<|:?*"
-- Gary''s Student gsnu200710 "Barb Reinhardt" wrote: Can someone direct me to the naming convention for workbook names. What is allowed and what is not? I want to suggest some workbook names for a SAVEAS and want to avoid traps because of the convention. Thanks, Barb Reinhardt |
Naming convention for workbook names
If you avoid punctuation character other than a space or comma, you should
be OK. There are no special rules that apply to workbooks. A workbook name must be a valid Windows file name, no more, no less. You could test with code for a valid name before using it. Function IsValidFileName(FileName As String) As Boolean Dim S As String On Error Resume Next S = Dir(FileName) IsValidFileName = (Err.Number = 0) End Function Sub AAA() Dim FName As String FName = "Bo|ok1.xls" If IsValidFileName(FName) = True Then Debug.Print "FileName Is Valid" Else Debug.Print "FileName is not valid." End If End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (email on the web site) "Barb Reinhardt" wrote in message ... Can someone direct me to the naming convention for workbook names. What is allowed and what is not? I want to suggest some workbook names for a SAVEAS and want to avoid traps because of the convention. Thanks, Barb Reinhardt |
All times are GMT +1. The time now is 10:45 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com