Errors Creating New Macro or Module Sheet
ID: Q124596
|
The information in this article applies to:
-
Microsoft Project for Windows, version 4.0
-
Microsoft Excel for Windows, versions 5.0, 5.0c
IMPORTANT: This article contains information about editing the registry.
Before you edit the registry, make sure you understand how to restore it if
a problem occurs. For information about how to do this, view the "Restoring
the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key"
Help topic in Regedt32.exe.
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 resolve this problem, copy the Vbaen.olb and Stdole.tlb
files to the appropriate local locations on your computer. For example,
copy these files to the following locations.
File Folder
-----------------------------
Vbaen.olb Windows\System
Stdole.tlb Windows\System
After you copy the files locally, use the appropriate following procedure.
WARNING: Using Registry Editor incorrectly can cause serious problems that
may require you to reinstall your operating system. Microsoft cannot
guarantee that problems resulting from the incorrect use of Registry Editor
can be solved. Use Registry Editor at your own risk.
For information about how to edit the registry, view the "Changing Keys And
Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete
Information in the Registry" and "Edit Registry Data" Help topics in
Regedt32.exe. Note that you should back up the registry before you edit it.
If you are running Windows NT, you should also update your Emergency
Repair Disk (ERD).
If You Are Running the Program Under Microsoft Windows 3.x
- 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.
- 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)
- 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.
- 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
- 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
- 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
- From the File menu, choose Save Changes.
If You Are Running the Program Under Microsoft Windows NT 3.51
To edit the registry to point to new locations, use the following steps:
- In Program Manager, click Run on the File menu.
- In the command line box, type "regedit /v" (without the quotation
marks). Click OK.
- On the Search menu, click Find Key.
- Type the following in the Find What box
\TypeLib\{000204F3-0000-0000-C000-000000000046}\1.0\9\Win16
and then click Find Key.
- Modify the value of this key to use the new path of Vbaen.olb (the value
box is at the top of the window below the menu bar) and press ENTER.
- On the Search menu, click Find Key.
- Type the following in the Find What box
\TypeLib\{00020430-0000-0000-C000-000000000046}\1.0\9\Win16
and click Find Key.
- Modify the value of this key to use the new path of Stdole.tlb (the
value box is at the top of the window below the menu bar) and press
ENTER.
- On the File menu, click Exit. Click Yes to save changes.
- Restart Windows.
If You Are Running the Program Under Windows 95 or Windows NT 4.0
To edit the registry to point to new locations, use the following steps:
- On the Start menu, click Run.
- Type "regedit" (without the quotation marks), and click OK.
- In the Registry window, click the plus sign (+) to the left of the
following keys, in order
HKEY_CLASSES_ROOT
TypeLib
{000204F3-0000-0000-C000-000000000046}
1.0
9
to open the following registry key:
My Computer\HKEY_CLASSES_ROOT\TypeLib\{000204F3-0000-0000-C000-
000000000046}\1.0\9
Then, click the folder to the left of Win16. The following key appears
in the status bar:
My Computer\HKEY_CLASSES_ROOT\TypeLib\{000204F3-0000-0000-C000-
000000000046}\1.0\9\Win16
- Click the entry for Vbaen.olb.
- On the Edit menu, click Modify.
- Change the Value Data to the new path for Vbaen.olb and click OK.
- In the Registry window, click the plus sign (+) to the left of the
following keys, in order
HKEY_CLASSES_ROOT
TypeLib
{00020430-0000-0000-C000-000000000046}
1.0
9
to open the following registry key:
My Computer\HKEY_CLASSES_ROOT\TypeLib\{00020430-0000-0000-C000-
000000000046}\1.0\9
Then, click the folder to the left of Win16. The following key
appears in the status bar:
My Computer\HKEY_CLASSES_ROOT\TypeLib\{00020430-0000-0000-C000-
000000000046}\1.0\9\Win16
- Click the entry for Stdole.tlb.
- On the Edit menu, click Modify.
- Change the Value Data to the new path for Stdole.tlb and click OK.
- Repeat steps 3-10 using the following registry keys:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{000204F3-0000-0000-
C000-000000000046}\1.0\9
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{00020430-0000-0000-
C000-000000000046}\1.0\9
- On the Registry menu, click Exit.
- Restart Windows.
Additional Steps if Necessary
If the above sections do not correct this problem, use the following
troubleshooting steps to correct any miscellaneous pathing problems:
- 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:
Q100836
Setup Error Message: "While Registering OLE Servers..."
- 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.
- 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.
- If the file VBAEN.OLB exists from a previous installation, rename this
file before performing another installation.
- Make sure there are no batch files or network login scripts that will
overwrite the correct Windows path in the PATH environment
variable.
- Copy the file TYPELIB.DLL to the \WINDOWS\SYSTEM directory.
- 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:
5.00c netware
Keywords :
Version : WINDOWS:4.0,5.0,5.0c
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: July 12, 1999