XL: Err Msg: File Error, Cannot Find XLODBC.DLL

ID: Q116176

The information in this article applies to:

SYMPTOMS

If you are using a workstation installation of Microsoft Excel, and you choose the Add-ins command to add the ODBC add-in, you may receive any of the following error messages.

   Windows 3.x or Windows 95
   -------------------------

   File Error
   Cannot find XLODBC.DLL.

   -or-

   Attempt to register XLODBC.XLA failed.

   -or-

   Unable to copy add-in to library.

   Macintosh
   ---------

   Attempt to register XLODBC code resource failed.


CAUSE

This problem occurs because the add-in manager places the XLODBC.XLA file in a folder (directory) that is different from the folder where the XLODBC.DLL is located. XLODBC.XLA is located in two places on your hard disk, and the add-in manager is attempting to access the file from the wrong location.

The XLODBC.XLA must be located in the same folder as the XLODBC.DLL file for the add-in to work with ODBC functionality. The Add-in Manager is using the copied XLODBC.XLA file located in the EXCEL\LIBRARY folder (the Macro Library:MS Query folder on the Macintosh) and cannot find XLODBC.DLL (which is located in the MSQUERY folder).

The Add-in Manager in Microsoft Excel does not recognize the MSQUERY folder as an add-in folder. Therefore, when you select the ODBC Add-in, the Microsoft Excel Add-in Manager attempts to copy the XLODBC.XLA file to the wrong folder.

NOTE: The file XLODBC.DLL is replaced with the file XLODBC32.DLL in Microsoft Excel 97.

WORKAROUND

To work around this problem, use the following appropriate procedure.

NOTE: Once you complete the appropriate workaround, you may want to change the rights for the server that the workstation is accessing such that the server is read-only. If the server is made read-only, the Add-in manager will be unable to copy the XLODBC.XLA file to the incorrect location.

Microsoft Excel for Windows

To work around this problem in Microsoft Excel for Windows, follow these steps:

1. Delete the XLODBC.XLA file from the EXCEL\LIBRARY folder.

   NOTE: It is not necessary to delete any files in Microsoft Excel 97.

2. Click Add-ins from the Tools menu.

3. Click Browse, in the Add-ins dialog box, click the XLODBC.XLA file

   from EXCEL\LIBRARY\MSQUERY, and click OK.

   -or-

   In Microsoft Excel 97, click Browse and click XLODBC.XLA from
   <Office folder>\OFFICE\LIBRARY\MSQUERY, and click OK.

4. Click NO when you receive the following message:

      Copy XLODBC.XLA to Microsoft Excel Add-in Library?

   You do not want to copy the file. The proper location of XLODBC.XLA and
   XLODBC.DLL on the shared network location will be retained.

5. Confirm the proper reference of the XLODBC.XLA Add-in in your
   EXCEL5.INI for Microsoft Excel 5.0, located in the Windows folder on
   your local workstation. If the Add-in reference still points to
   EXCEL\LIBRARY, change this line to EXCEL\LIBRARY\MSQUERY, and save the
   EXCEL5.INI file.

   NOTE: Make this change after you quit Microsoft Excel.

Microsoft Excel for the Macintosh

To work around this problem in Microsoft Excel for the Macintosh, follow these steps:

1. Delete the XLODBC.XLA file from the Microsoft Excel 5:Macro Library

   folder.

2. From the Tools menu, choose Add-ins.

3. In the Add-ins dialog box, choose Browse, select the XLODBC.XLA file

   from the Microsoft Excel 5:Macro Library:MS Query folder, and
   choose OK.

4. Choose No when you receive the following message:

      Copy XLODBC.XLA to Microsoft Excel Add-in Library?

   You do not want to copy the file. The proper location of XLODBC.XLA
   (Microsoft Excel 5:Macro Library:MSQuery) will be retained.

If you continue to have trouble using the ODBC add-in commands, quit Microsoft Excel and drag the Excel Settings (5) file from the Preferences folder to the Trash. Restart Microsoft Excel, and then repeat steps 1-4. Note that if you do this, all your custom settings will be reset to the default settings.

Additional query words: 5.00 5.00a 5.00c 7.00 addin connection path not found

Keywords          : kberrmsg kbtool xlquery 
Version           : MACINTOSH:5.0,5.0a; WINDOWS:1.0,2.0,5.0,5.0c,7.0
Platform          : MACINTOSH WINDOWS
Issue type        : kbbug
Solution Type     : kbpending

Last Reviewed: May 17, 1999