PRB: Error Messages When Editing, Running, or Recording VBA Macros in Office 97 Application on Windows 2000
This article was previously published under Q264743 On This PageSYMPTOMS
When you log in as a default or restricted user on a Microsoft Windows 2000 computer and you try to run Microsoft Word 97, Microsoft Excel 97, or Microsoft PowerPoint 97 and then migrate to the Visual Basic for Applications Editor or record a macro from the application, you might receive an error message.
Microsoft Word: When you start Microsoft Word, you receive the following error message:
The Windows registry has reported that one or more required files are damaged or missing. To correct this problem, run the Word Setup program.
After you click OK to dismiss the dialog box and launch Word, if you then attempt to use the VBA Editor or record a new macro, you receive the following error message:
Could not open macro storage.
Microsoft Excel:When you start Microsoft Excel, you receive the following error message:
Cannot use object linking and embedding.
If you ignore the preceding error message, and then attempt to use the VBA Editor, the VBA Editor may appear momentarily and then shut down, or you may receive the following error message:
The instruction at "0x3044f435" referenced memory at "0x00000018". The memory could not be "read".
Microsoft PowerPoint:When you try to start Microsoft PowerPoint, you may receive the following error message and PowerPoint may shut down:
PowerPoint found an error that it can't correct. You should save presentations, exit, and then restart PowerPoint.
In some cases, PowerPoint starts up and displays the preceding error message when you try to move to the VBA Editor or record a macro.
CAUSE
When a user accesses VBA for the first time, VBA creates a file named MSForms.exd in the user's temporary folder. This file is a type library that VBA caches for a COM object and is required for FM20/MSForms to function correctly. Once VBA creates the type library file, it then attempts to register it; if the user does not have write access to required registry keys, the registration fails. Consequently, VBA fails to initialize properly and various errors might occur on attempts to use VBA in Office 97 applications. Users running Windows 2000 who are members of the Users group only and who do not have Administrator or Power User privileges might encounter this problem due to restraints for write access to required registry keys. STATUS
This behavior is by design.
MORE INFORMATIONWorkaround #1Search the user's temporary folder for MSForms.exd and delete the file. With Windows 2000, each user has his or her own temporary folder. For example:C:\Documents and Settings\[UserName]\Local Settings\Temp\VBE\MSForms.exd
Once you have deleted MSForms.exd, you should then grant write access to the following keys for the users who need to use VBA from Office 97 applications:
HKEY_CLASSES_ROOT\Clsid Steps to Grant Permissions to Registry KeysHKEY_CLASSES_ROOT\Typelib HKEY_CLASSES_ROOT\Interface
Workaround #2If a user with Power User or Administrator privileges has already used VBA on the system, an MSForms.exd file has been created for that user. Copy this MSForms.exd to the restricted user's temporary folder. If you want new users to get the MSForms.exd automatically, you could put a copy in the temporary folder for the Default User. For example, in the directory:
C:\Document Settings\Default User\Local Settings\Temp\vbe\Msforms.exd
If no user has previously used VBA on the system and no MSForms.exd has been created, then you could copy this file from another system and register it as a user with write access to the registry keys mentioned in "Workaround #1". To register the type library, on the Windows Start menu, choose the Run command, type the following, and then click OK:
regtlib.exe C:\Temp\VBE\msforms.exd
If users already have this file, replace it with the one from the Administrator or Power User's Temp\Vbe directory.
Steps to Reproduce the ErrorThe following steps describe how to reproduce this error from Word 97. Other Office applications have similar steps.
REFERENCESFor additional information, click the article number below
to view the article in the Microsoft Knowledge Base:
244064 (http://support.microsoft.com/kb/244064/EN-US/) INFO: Upgrade Techniques for Controls and Extenders w/VBASDK
For more information, please see the following Microsoft Web page:
Office Integration and Extensibility Page (http://support.microsoft.com/?scid=http%3a%2f%2fsupport.microsoft.com%2fsupport%2fofficedev%2foffdevout.asp) APPLIES TO
| Article Translations
|

Back to the top
