"One of your object libraries is missing or damaged" error when opening a file using a VBA macro or start Visual Basic Editor

Article translations Article translations
Article ID: 296114 - View products that this article applies to.
This article was previously published under Q296114
Expand all | Collapse all

On This Page

SYMPTOMS

When you open a file with a Visual Basic for Applications macro or you try to start the Visual Basic Editor, you may receive an error message similar to one of the following:
One of your object libraries (excel9.olb) is missing or damaged. Please run setup to install it.
One of your object libraries (stdole32.tlb) is missing or damaged. Please run setup to install it.
When you click OK in the dialog box for the first error, the following error message appears:
An error occurred initializing the VBA libraries (32797).
When you click OK in the dialog box for the second error, the following error message appears:
 An error occurred initializing the VBA libraries (32796).

One of your object libraries <...> is missing or damaged. Please run setup to install it. (VBE6EXT.olb)
  When you click OK in the dialog box for the second error, the following error message appears: the Microsoft Installer will run, the following error appears:  Microsoft Visual Basic "Out of Memory"

CAUSE

The error messages described in the "Symptoms" section of this article can appear if the permissions on the following registry subkey, or one or more of its subkeys, has been changed from their default values:
HKEY_LOCAL_MACHINE\Software\Classes\TypeLib

RESOLUTION

To resolve this problem reset the permissions to the default settings by using the appropriate method for your version of Windows.

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows

Windows NT 4.0

The default permissions on the HKEY_LOCAL_MACHINE\Software\Classes\TypeLib subkey on Windows NT 4.0 are as follows:
   User/Group                              Permission
   ---------------------------------------------------------------------

   Creator Owner                           Full Control
   Everyone                                Read
   <machine name>\Administrators           Full Control
   Interactive                             Special Access
   System                                  Full Control
				
NOTE: The Special Access permissions for the Interactive account include the following:
Query Value
Set Value
Create Subkey
Enumerate Subkeys
Notify
Delete
Read Control
Change the permissions back to their default values. To do this, follow these steps:
  1. Log in as a member of the Administrators group.
  2. On the Start menu, click Run.
  3. In the Open box, type Regedt32 and click OK.
  4. Under the HKEY_LOCAL_MACHINE key, locate and select the following subkey:
    Software\Classes\TypeLib
  5. On the Security, menu click Permissions. If the Everyone group, is not listed in the Registry Key Permissions dialog box, add this group and assign it Read permissions. To do this, follow these steps:
    1. In the Registry Key Permissions dialog box, click Add.
    2. In the Add Users and Groups dialog box in the List Names From list, select the machine name.
    3. In the Names list, select the Everyone group, and then click Add.
    4. In the Type of Access list, select Read.
    5. Click OK.
    6. Repeat steps a through e for each group for which you need to reset permissions to their default settings.
    7. In the Registry Key Permissions dialog box, click to select the Replace Permission on Existing Subkeys check box.
    8. Click OK.
    9. If you receive a message about replacing permissions on all existing subkeys, click Yes.
  6. On the Registry menu, click Exit.
  7. Log off and then log back on as the user experiencing the problem described in the "Symptoms" section of this article.

Windows 2000

The default permissions on the HKEY_LOCAL_MACHINE\Software\Classes\TypeLib subkey on Windows 2000 are as follows:
   User/Group                                        Permission
   ---------------------------------------------------------------------

   Administrators (<machine name>\Administrators)    Full Control
   Creator Owner                                     Full Control
   Everyone                                          Read
   Power Users (<machine name>\Administrators)       Special
   System                                            Full Control
   Users                                             Read
				
NOTE: The Special permissions for the Power Users group include the following:
Query Value
Set Value
Create Subkey
Enumerate Subkeys
Notify
Delete
Read Control
Change the permissions back to their default values. To do this, follow these steps:
  1. Log in as a member of the Administrators group.
  2. On the Start menu, click Run.
  3. In the Open box, type Regedt32 and click OK.
  4. Under the HKEY_LOCAL_MACHINE key, locate and select the following subkey:
    Software\Classes\TypeLib
  5. On the Security menu, click Permissions.

    If the Power Users group is not listed in the Permissions for Typelib dialog box, add this group and assign it Special permissions. To do this, follow these steps:
    1. Click to clear the Allow inheritable permissions from parent to propagate to this object check box.
    2. In the Security dialog box, click Copy.
    3. Click Advanced.
    4. In the Access Control Settings for TypeLib dialog box, click Add.
    5. In the Look in list, select the machine name for your computer. In the Name box, type Power Users. Click OK.
    6. In the Permission Entry for TypeLib dialog box set the following permissions for the Power Users group.
      Query Value
      Set Value
      Create Subkey
      Enumerate Subkeys
      Notify
      Delete
      Read Control
      When finished, click OK.
    7. In the Access Control Settings for TypeLib dialog box, click to select the Reset permissions on all child objects and enable propagation of inheritable permissions check box.
    8. Click OK. If you receive a prompt about removing explicitly defined permissions on all child objects, click Yes.
    9. Repeat steps a through h for each group for which you need to reset permissions to their default settings.
    10. In the Permissions for TypeLib dialog box, click OK.
  6. On the Registry menu, click Exit.
  7. Log off and log back on as the user experiencing the problem described in the "Symptoms" section of this article.

Windows XP

The default permissions on the HKEY_LOCAL_MACHINE\Software\Classes\TypeLib subkey on Windows XP are as follows:
Administrators (<machine name>\Administrators) : Full Control
Creator Owner : Full Control
Power Users (<machine name>\Power Users) : Special
System : Full Control
Users (<machine name>\Users) : Read
 ** If you have an EVERYONE group : set permissions to READ

NOTE: The Special permissions for the Power Users group include the following:
Query Value
Set Value
Create Subkey
Enumerate Subkeys
Notify
Delete
Read Control

Browse to registry location: HKEY_LOCAL_MACHINE\Software\Classes\TypeLib > Right click and select 'Permissions'
1. Change the USERS group to ‘Read’ permissions. This should resolve the issue with opening VBA and files with macros.
2. Go back to the USERS group > Advanced permissions > select to "Replace permission entries on all child objects...". This should resolve the issue of the installer running each time Excel is opened.
 Additional Windows XP permissions reference: http://support.microsoft.com/kb/308419



Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Properties

Article ID: 296114 - Last Review: April 19, 2012 - Revision: 2.0
APPLIES TO
  • Microsoft Excel 2002 Standard Edition
  • Microsoft Office Excel 2003
Keywords: 
kbstartprogram kbautomation kbmacro kbopenfile kbdtacode kberrmsg kbprb KB296114

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com