XL97: "Invalid Data Format" Error Opening Workbook

ID: Q193650

The information in this article applies to:

SYMPTOMS

When you open a workbook in Microsoft Excel 97 for Windows, you may receive the following error message twice:

   Invalid data format

If you try to activate, remove, or export a module in the Visual Basic Editor, or when you close the workbook, you may receive the same error message.

CAUSE

This problem occurs if the workbook contains a Visual Basic module named "dir" or "Dir."

RESOLUTION

If this problem occurs, it is not possible to remove the module from the workbook. It is also not possible to rename the module so that it may be removed or activated.

Because you cannot do anything to the module, you must copy all information from the workbook into a new workbook, save the new workbook with a different name, and then delete the original workbook. For more information about how to do this, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q142117
   TITLE     : XL: Summary of Methods to Recover Data from Corrupted
               Files

To prevent this problem from occurring, do not name a Visual Basic module "dir" or "Dir."

STATUS

Microsoft has confirmed this to be a problem in Microsoft Excel 97 for Windows.

Additional query words: XL97

Keywords          : kbdta xlloadsave xlvbainfo 
Version           : WINDOWS:97
Platform          : WINDOWS
Issue type        : kbbug
Solution Type     : kbnofix

Last Reviewed: November 2, 1998