"Cannot Find VBAEN.OLB" Creating New Macro or Module Sheet

Last reviewed: July 24, 1997
Article ID: Q124596
The information in this article applies to:
  • Microsoft Visual Basic Programming System, Applications Edition, version 1.0
  • Microsoft Project for Windows, version 4.0
  • Microsoft Excel for Windows, versions 5.0, 5.0c
  • Microsoft Office for Windows, versions 4.2, 4.3

SYMPTOMS

In Microsoft Excel, when you insert a new module sheet or record a new macro using the Visual Basic language, (which also inserts a Module sheet) you may receive one of the following error messages:

   VBA English/Standard (VBAEN.OLB) object library not found

   -or-

   Object library not registered

In Microsoft Project, you may experience the following problems if you are using a network installation of Microsoft Project:
  • When you attempt to view macros in the Macros dialog box, the list is empty

    -and-

  • When you attempt to create a macro, you receive the error message "Cannot Find VBAEN.OLB"

CAUSE

By default, when the files VBAEN.OLB and STDOLE.TLB reside on a networked drive, path information to these files is stored in the registration database (REG.DAT) using Universal Naming Convention (UNC) names.

Some network configurations have difficulties providing correct UNC pathing to the VBAEN.OLB and STDOLE.TLB files. When this occurs, the above symptoms result.

This behavior also occurs if incorrect information is contained in the keys in the REG.DAT file that Microsoft Excel and Microsoft Project use to locate the file VBAEN.OLB. It is not known why this occurs. This usually occurs in a networked environment. Some of the causes for the file VBAEN.OLB not to be registered correctly when you start Microsoft Excel or Microsoft Project include the following:

  • Incorrect environment strings for the PATH statement in your AUTOEXEC.BAT file

    -or-

  • Incorrect environment strings for the WINDIR variable

    -or-

  • A network login script may be overwriting the PATH to the VBAEN.OLB file.

    -or-

  • A network administrative installation (setup /a) was performed while running a different copy of shared Windows than the workstation, or without full and exclusive rights.

RESOLUTION

To work around this problem, manually edit the registration database file, REG.DAT, to add the correct reference using the following steps:

  1. From Program Manager, choose Run from the file menu. In the Command line box, type "REGEDIT /V" (without the quotation marks), and then choose OK.

  2. From the Registration Info Editor Search menu, choose Find Key. In the Find What box, type "typelib" (without the quotation marks), and choose the Find Next button.

    This search process should take you to a location labeled

          TypeLib = OLE (Part 4 of 5)
    

  3. Locate the "1.0 = Visual Basic for Applications" line. Below this line there should be a line resembling the following:

          win16 = \\Server\Share\Directory(s)\VBAEN.OLB
    

    NOTE: You may see a double backslash in the middle of the entry, for example Server\Share\\Directory\VBAEN.OLB. This is an indication that the system is not properly using the UNC name.

  4. Modify the entry to resemble the following

         win16 = <drive>\<directory>\VBAEN.OLB
    

    where <drive> is the drive on which your Windows directory is located, and <directory> is your Windows directory. For example, if your Windows directory is on drive Y, you would type the following:

         win16 = Y:\Windows\VBAEN.OLB
    

  5. Find the line that reads "1.0 = OLE Automation." Beneath this entry is a line that should resemble the following:

         win16 = \\Server\Share\Directory(s)\STDOLE.TLB
    

  6. Modify this entry to resemble the following:

         win16 = <drive>\<directory>\STDOLE.TLB
    

    where <drive> is the drive on which you Windows directory is located and <directory> is your Windows directory. For example, if your Windows directory is on drive Y, you would type the following:

         win16 = Y:\Windows\STDOLE.TLB
    

  7. From the File menu, choose Save Changes.

If the above workaround does not correct this problem, use the following troubleshooting steps to correct any miscellaneous pathing problems:

  1. Make sure the WINDIR environment variable is set correctly. For more information about how to check and correct the WINDIR environment variable value, please see the following article(s) in the Microsoft Knowledge Base:

    ARTICLE-ID: Q100836

       TITLE     : Setup Error Message: "While Registering OLE Servers..."
    
    

  2. Make sure that the PATH statement in your AUTOEXEC.BAT file contains the correct path information for Windows (such as "C:\WINDOWS"). See your MS-DOS documentation for more information.

  3. When you perform an administrative installation (SETUP /A) of Microsoft Project or Microsoft Excel with a shared copy of Windows, make sure that you have full rights to the shared Windows directory and that no one else is using the network server.

  4. If the file VBAEN.OLB exists from a previous installation, rename this file before performing another installation.

  5. Make sure there are no batch files or network login scripts that will overwrite the correct Windows path in the PATH environment variable.

  6. Copy the file TYPELIB.DLL to the \WINDOWS\SYSTEM directory.

  7. After you finish the steps above, run Setup again.

MORE INFORMATION

The information that is used to create the entry for VBAEN.OLB in the REG.DAT file is located in the setup table file, SETUP.STF file. This entry is written during Setup. Setup does not re-create the entry if the VBAEN.OLB file exists in the \WINDOWS\SYSTEM directory from a previous installation. Reinstalling Microsoft Project or Microsoft Excel will not resolve this problem unless you rename the VBAEN.OLB file and resolve any incorrect pathing issues prior to running Setup.


Additional query words: 4.00 5.00 5.00c netware
Keywords : kbcode kbnetwork kbprg
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 24, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.