Microsoft KB Archive/296114

= &quot;One of your object libraries is missing or damaged&quot; error message when you open a file by using a VBA macro or when you try to start the Visual Basic Editor =

Article ID: 296114

Article Last Modified on 1/31/2007

-

APPLIES TO

 Microsoft Excel 2002 Standard Edition, when used with:  Microsoft Windows NT 4.0

 Microsoft Windows 2000 Standard Edition 

-



This article was previously published under Q296114



IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry



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).



CAUSE
The error messages described in the &quot;Symptoms&quot; 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

<div class="resolution_section">

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

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

Windows NT 4.0
The default permissions on the HKEY_LOCAL_MACHINE\Software\Classes\TypeLib subkey on Windows NT 4.0 are as follows: <pre class="fixed_text">  User/Group                              Permission -

Creator Owner                          Full Control Everyone                               Read \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: <ol> Log in as a member of the Administrators group.</li> On the Start menu, click Run.</li> In the Open box, type Regedt32 and click OK.</li> Under the HKEY_LOCAL_MACHINE key, locate and select the following subkey:

Software\Classes\TypeLib

</li> 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: <ol style="list-style-type: lower-alpha;"> In the Registry Key Permissions dialog box, click Add.</li> In the Add Users and Groups dialog box in the List Names From list, select the machine name.</li> In the Names list, select the Everyone group, and then click Add.</li> In the Type of Access list, select Read.</li> Click OK.</li> Repeat steps a through e for each group for which you need to reset permissions to their default settings.</li> In the Registry Key Permissions dialog box, click to select the Replace Permission on Existing Subkeys check box.</li> Click OK.</li> If you receive a message about replacing permissions on all existing subkeys, click Yes.</li></ol> </li> On the Registry menu, click Exit.</li> Log off and then log back on as the user experiencing the problem described in the &quot;Symptoms&quot; section of this article.</li></ol>

Windows 2000
The default permissions on the HKEY_LOCAL_MACHINE\Software\Classes\TypeLib subkey on Windows 2000 are as follows: <pre class="fixed_text">  User/Group                                        Permission -

Administrators ( \Administrators)   Full Control Creator Owner                                    Full Control Everyone                                         Read Power Users ( \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: <ol> <li>Log in as a member of the Administrators group.</li> <li>On the Start menu, click Run.</li> <li>In the Open box, type Regedt32 and click OK.</li> <li>Under the HKEY_LOCAL_MACHINE key, locate and select the following subkey:

Software\Classes\TypeLib

</li> <li>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: <ol style="list-style-type: lower-alpha;"> <li>Click to clear the Allow inheritable permissions from parent to propagate to this object check box.</li> <li>In the Security dialog box, click Copy.</li> <li>Click Advanced.</li> <li>In the Access Control Settings for TypeLib dialog box, click Add.</li> <li>In the Look in list, select the machine name for your computer. In the Name box, type Power Users. Click OK.</li> <li>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.</li> <li>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.</li> <li>Click OK. If you receive a prompt about removing explicitly defined permissions on all child objects, click Yes.</li> <li>Repeat steps a through h for each group for which you need to reset permissions to their default settings.</li> <li>In the Permissions for TypeLib dialog box, click OK.</li></ol> </li> <li>On the Registry menu, click Exit.</li> <li>Log off and log back on as the user experiencing the problem described in the &quot;Symptoms&quot; section of this article.</li></ol>

Additional query words: OFF2000 XL2000

Keywords: kbstartprogram kbautomation kbmacro kbopenfile kbdtacode kberrmsg kbprb KB296114

-

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

© Microsoft Corporation. All rights reserved.