Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

XL2000: Workbook Name Contains Invalid Characters


View products that this article applies to.

Symptoms

In Microsoft Excel, you may see any of the following behaviors:
  • The name of the workbook may contain either of the bracket characters: [ ]

    -or-

  • The name on the sheet tab for the workbook contains the file name extension and a ] character preceding the sheet names, for example, .xls]Sheet1

    -or-

  • When you rename a sheet that contains the file name extension and ] character, you receive the following error message:
    While renaming a sheet or chart, you entered an invalid name. Try one of 
    the following:
    
     - Make sure the name you entered does not exceed 31 characters.
     - Make sure the name does not contain any of the following characters: 
       : \ / ? * [ or ]
     - Make sure you did not leave the name blank.
    						

↑ Back to the top


Cause

These behaviors may occur when you do either of the following:
  • You programmatically save a file with a file name that includes the [ or ] characters.

    -or-
  • You open a file that was renamed outside of Excel, with a file name that includes the [ or ] characters.

↑ Back to the top


Workaround

To work around this problem, save the file using a new name without [ or ] characters.

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

↑ Back to the top


More information

When you programmatically save a file, Excel does not validate the file name by checking for either the [ or ] characters. Therefore, Visual Basic for Applications allows you to save a file with either or both of these characters.

↑ Back to the top


Keywords: KB215205, kbnofix, kbbug

↑ Back to the top

Article Info
Article ID : 215205
Revision : 3
Created on : 9/25/2003
Published on : 9/25/2003
Exists online : False
Views : 265