XL: Timer Driver and "Error Occurred Initializing VBA Libraries" (109778)



The information in this article applies to:

  • Microsoft Excel for Windows 95
  • Microsoft Excel for Windows 5.0
  • Microsoft Excel for Windows 5.0c
  • Microsoft Project for Windows 4.0
  • Microsoft Project for Windows 95 4.1

This article was previously published under Q109778

SYMPTOMS

When you start Microsoft Excel, after the Microsoft Excel logo is displayed on the screen, you may receive the following error messages:
An Error Occurred Initializing VBA Libraries

-or-

The Timer driver is not installed on this system. Microsoft Excel cannot run without the Timer driver. Choose the help button for more information.
Note that you may also receive the Timer Driver error message when you start Windows.

CAUSE

Microsoft Excel Version 7.0

In order to run Microsoft Excel version 7.0, the file Mmsystem.dll must be on your computer.

When you start Microsoft Excel version 7.0, you receive the error messages in the "Symptoms" section if any of the following conditions is true:
  • The Mmsystem.dll file is not loaded on your system or is damaged.

    -or-
  • The System.ini file does not contain the correct entry for Mmsystem.dll.

    -or-
  • Windows was not successfully installed on your computer.

    -or-
  • You have drivers installed that have created or modified entries in the [Boot] section of the System.ini file. These entries are causing conflicts that return these error messages.

Microsoft Excel Version 5.0

In order to run Microsoft Excel version 5.0, the Timer.drv, Mmsystem.dll, and Vtdapi.386 files must be available on your computer.

NOTE: When the Vtdapi.386 file is missing or damaged or the System.ini file does not contain the correct entry for this file, you receive a Timer.drv error message when you start Windows.

When you start Microsoft Excel version 5.0, you receive the error messages in the "Symptoms" section if any of the following conditions is true:
  • The Timer.drv, Mmsystem.dll, or Vtdapi.386 file is not loaded on your system or is damaged.

    -or-
  • The System.ini file does not contain the correct entries for Timer.drv, Mmsystem.dll, and Vtdapi.386.

    -or-
  • Windows was not successfully installed on your computer.

    -or-
  • You have drivers installed that have created or modified entries in the [Boot], [Drivers], or [386Enh] sections of the System.ini file. These entries are causing conflicts that return these error messages.

    -or-
  • You are running Microsoft Excel version 5.0 under OS/2.
For additional information, please click the article number below to view the following article in the Microsoft Knowledge Base:

154658 PRJ41: "Could Not Initialize VBA", "Timer Driver Not Installed"

WORKAROUND

Method 1: If You Are Running Microsoft Excel Under Windows

Use the steps, based upon the version of Microsoft Excel you are running, to verify that the files are correctly installed and that the System.ini file contains the appropriate entries:
  1. Make sure the System.ini file contains the correct lines for Mmsystem.dll, Vtdapi.386, and Timer.drv. The lines are as follows:

    NOTE: Make sure that you do not have trailing spaces on any of the following lines.

    Microsoft Excel Versions 5.0 and 7.0

    1. In the [BOOT] section of the System.ini file, the following line is required:
      drivers=mmsystem.dll
      This line specifies which drivers to load when you start Microsoft Windows, so additional drivers may be listed on this line. For example, the line may read:
      drivers=mmsystem.dll pen penwindows
      For additional information about this line, see the Pjreadme.hlp file that is installed with Microsoft Project.

      Microsoft Excel Version 5.0

    2. In the [386Enh] section of the System.ini file, the following line is required:
      device=vtdapi.386
    3. In the [drivers] section of the System.ini file, the following line is required:
      timer=timer.drv
  2. Use the appropriate method for your operating system.

    Windows 95

    Make sure the Mmsystem.dll file is loaded on your computer. This file should be located in your \Windows\System folder. If the file does not exist on your computer, do the following to extract it from your Windows disks:

    1. Copy Extract.exe from the "Disk 1 -Setup" disk to the root directory of your hard disk drive.
    2. On the Start menu, point to Programs and then click MS-DOS Prompt.
    3. In the MS-DOS Prompt window, change to your root directory.
    4. Insert Disk 8 of your Windows 95 disks and type the following at the command prompt:

      extract a:\Win95_08.cab /L c:\Windows\System Mmsystem.dll

    5. After the Extract program finishes extracting the file to your computer, type the following at the command prompt:

      exit

    6. Eject Disk 8 from your floppy drive and restart your computer.

    Windows Version 3.1 and Windows for Workgroups Version 3.11

    Make sure the files Timer.drv, Mmsystem.dll, and Vtdapi.386 are loaded on your computer. All three files should be located in your \Windows\System directory. If the files do not exist on your computer, expand them from your Windows disks. Check your computer for duplicate file names, and rename as needed.

    To expand the files:

    1. Exit windows to the MS-DOS prompt.
    2. Change to the WINDOWS directory.
    3. In drive A, insert the disk that contains the file that you want to expand:
           Microsoft Windows Version 3.1
           -----------------------------
      
           Timer.drv is located on Disk 3 (Windows 3.1), Disk 5
           (Windows 3.11)
      
           Mmsystem.dll is located on Disk 4 (Windows 3.1 and 3.11)
      
           Vtdapi.386 is located on Disk 3 (Windows 3.1), Disk 5
           (Windows 3.11)
           Microsoft Windows for Workgroups, Version 3.11
           ----------------------------------------------
      
           Timer.drv is located on Disk 5 (Disk 7 if 5.25-inch disks)
      
           Mmsystem.dll is located on Disk 4
      
           Vtdapi.386 is located on Disk 5 (Disk 7 if 5.25-inch disks)
    4. At the MS-DOS command prompt, do the following to expand the files (assuming your Windows disk is in drive A):

      To Expand Timer.drv, type the following:

      Expand a:\timer.dr_ c:\windows\system\timer.drv

      To Expand Mmsystem.dll, type the following:

      Expand a:\mmsystem.dl_ c:\windows\system\mmsystem.dll

      To Expand Vtdapi.386, type the following:

      Expand a:\vtdapi.38_ c:\windows\system\vtdapi.386

Other things to look for:
  • If the System.ini file contains the correct lines and Timer.drv, Mmsystem.dll, and Vtdapi.386 are all on your system in the Windows\System directory, it may be possible that one or all of the files is damaged. In this case, delete the existing Timer.drv, Mmsystem.dll, and Vtdapi.386 files and expand them from your Windows disks using the instructions from step 2 above.

  • It is possible to have Windows directories on more than one drive. This may cause Setup to copy files to the wrong directory. In this case, make sure the path is pointing to the proper directory, and that the correct files are located in the \Windows\System directory.

  • Try commenting out the "LOAD=" and "RUN=" lines in WIN.INI by adding a semicolon (;) at the beginning of each line. Also, try removing all icons from the Program Manager Startup group. After making these changes, quit and restart Windows.

  • This can also occur if a directory is in the path prior to the Windows directory that contains one of these files. A Dos search for all instances of "Timer.drv", "mmsystem.dll", and "Vtdapi.386" will assist in the resolution of this issue. From a MS-DOS command prompt at the root of "C:", type the following:

    Dir Timer.drv /s

    to search all the subdirectories. Change your path statement and have your Windows directory be first.

Method 2: Check for New or Modified Entries in the System.ini File

Determine if a driver has created or modified entries in the [386Enh], [Boot], or [Drivers] sections of the System.ini file (and that this modification is causing the problem).

To do this, remark these entries out (type a semicolon at the beginning of each driver entry), and make sure that the appropriate entries are included in each section of the System.ini file (for information about these entries, see step 1 in "Method 1" earlier in this article).

Note that commenting these lines out may prevent you from running a certain application program or utility.

The following table includes specific examples of drivers that may create entries in the [386Enh], [Boot], or [Drivers] sections of the System.ini and, subsequently, may cause these error messages. The table also contains suggestions about how you may be able to avoid the error messages.
          For this       Using this
          Product        Driver        Make this modification
          --------------------------------------------------------------
          AceCad         AceCat 2      Check for multiple [Boot] sections.
          Enterprises                  Comment out all but one of these
          program                      sections and ensure that it
                                       contains the appropriate drivers=
                                       entry.
          --------------------------------------------------------------
          Adobe Type     atmsys.drv    Change the following lines in the
          Manager (ATM)                [Boot] section from
                                          system.drv=atmsys.drv
                                          atm.system.drv=system.drv

                                       to:

                                          system.drv=system.drv
          --------------------------------------------------------------
          After Dark     adwrap.drv    Remark out
          3.0
                                          drivers=d:\afterdark\arwrap.drv

                                       and add:

                                          drivers=mmsystem.dll
          ---------------------------------------------------------------
          Drawing                      Change
          tablet
                                       drivers=pen penwindows

                                       to:

                                       drivers=mmsystem.dll pen penwindows
          ----------------------------------------------------------------
          Explorer on Net              In the [BOOT] section, remark out:
          by FTP, Inc.
                                         drivers=c:\explorer\wcomapi.dll
          -----------------------------------------------------------------
          Kurta's        wtkurta       Change
          Tablet Driver
          version 8.01                    drivers=wtkurta
          or 8.0i
                                       to:

                                          drivers=mmsystem.dll
          --------------------------------------------------------------
          LapLink                      In the [386enh] section, remark out
                                       the lines that contain the
                                       following:

                                          vpd.386 (virtual parallel port)
                                          vcd.386 (virtual serial port)
                                          tsivid.386 (virtual used by TSI
                                                      Products)
          --------------------------------------------------------------
          Quarterdeck QEMM 8.0         Change

                                          drivers=C:\QEMM\mmsystem.dll

                                       to:

                                          drivers=mmsystem.dll
          --------------------------------------------------------------
          Safari 3180    sswincs.dll   Change
          Notebook with
          a PCMCIA card                   drivers=c:\pcmia2\cardview
          slot                            \sswincs.dll
                                       to:

                                          drivers=mmsystem.dll
          --------------------------------------------------------------
          Windows Sound                Check to see if the following line
          System                       has been remarked out:

                                          drivers=mmsystem.dll

                                       If it has been remarked out,
                                       remove the semicolon from the
                                       line. You may still receive the
                                       error message, but you will be
                                       able to run Microsoft Excel.
          --------------------------------------------------------------

Method 3: If Windows Is Not Installed Correctly

If you attempted to install Windows version 3.1 over Windows version 3.0, and the installation failed, the following line appears in the [Boot] section of the System.ini file:

oldshell=progman.exe

and the following line appears in the [Drivers] section of the System.ini file:

olddrivers=mmsystem.dll

To correct this problem, edit the System.ini file and remove the "old" prefix from both of these lines so that they appear as follows
   shell=progman.exe
and:
   drivers=mmsystem.dll
Also, make sure that there are no lines in the System.ini file that look like this:
   ;drivers=mmsystem.dll
If such lines exist, remove them from the System.ini file.

If You Are Running Microsoft Excel Under OS/2

If you receive a Timer.drv error message and you are running Microsoft Excel 5.0 under OS/2, you have to add the Timer.drv file to the system, because it is not installed for the OS/2 Windows emulation by default. Install the driver in a Windows session, using the Drivers icon in Control Panel.

The third-party products that are discussed in this article are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.

Modification Type:MinorLast Reviewed:8/16/2005
Keywords:KB109778