Microsoft KB Archive/221493

= XL: Code Module May Be Missing After Opening and Saving Workbook as Web Page =

Article ID: 221493

Article Last Modified on 1/24/2007

-

APPLIES TO


 * Microsoft Excel 2000 Standard Edition
 * Microsoft Excel 2002 Standard Edition

-



This article was previously published under Q221493



SYMPTOMS
If you save a file as a Web page, and that file contains Visual Basic for Applications macro code, when you reopen the file, you receive no warning that the file contains macros. If you go into the Visual Basic Editor there are no code modules and no Sub procedures available for that workbook.



CAUSE
This problem occurs when all of the following conditions are true: You open a workbook containing macro code, that you saved as a Web page (HTML file).

-and-

Excel cannot read the Editdata.mso file associated with the page. This problem occurs when any of the following conditions are true:


 * Another process locks the Editdata.mso file associated with the file.

-or-


 * The file does not have Write permissions (if saved on an NTFS partition).

-or-


 * The file is deleted.

When you save an entire workbook as a Web page (HTML), Excel stores all Visual Basic for Applications and OLE information in a file called Editdata.mso. It saves this file in a folder called _files in the same directory as the HTML file.

If Excel cannot read the Editdata.mso file when loading the HTML file, it doesn't display any warning, nor does it write it out again during any subsequent save. During the save operation, Excel detects that the Editdata.mso was not saved, and so it deletes any existing Editdata.mso file as unneeded. With no Editdata.mso file, therefore, the HTML file loses any macros.

Additional query words: XL2000

Keywords: kbpending kbprb KB221493

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.