XL5: "Cannot Execute MSQUERY.EXE" Using External Data

Last reviewed: February 2, 1998
Article ID: Q120724
The information in this article applies to:
  • Microsoft Excel for the Macintosh, version 5.0
  • Microsoft Excel for Windows, versions 5.0, 5.0c

SYMPTOMS

In Microsoft Excel, when you use the Get External Data command, or when you create a pivot table using an external data source, you receive the error message:

   Cannot Execute MSQUERY.EXE

CAUSE

Microsoft Excel for the Macintosh

This error message occurs if any of the following are true:

  • You have not run Microsoft Query on this machine before.

        -or-
    
  • You are running a workstation installation of Microsoft Excel.

        -or-
    
  • You are running the Macintosh version of Microsoft Excel (that is, you are not running the Power Macintosh version).

Microsoft Excel for Windows

This error message may also occur when you use the Get External Data command on a computer that is running Microsoft Windows 3.1 or Windows NT if the following is true:

  • The "Msquery=" line in the [Microsoft Query] section of the Win.ini file is not pointed to a valid location for Msquery.exe.

WORKAROUND

Microsoft Excel for the Macintosh

To work around this situation, do the following:

  1. Quit Microsoft Excel.

  2. In the folder to which you installed Microsoft Excel, start Microsoft Query by double-clicking the Query icon.

  3. Quit Microsoft Query.

NOTE: You may need to start Microsoft Query by double-clicking the Microsoft Query icon in the Microsoft folder, rather than by using the alias.

These steps register Microsoft Query in the Macintosh operating system Desktop file again, so that when the External Data commands attempt to start Microsoft Query, the operating system knows where to locate the program.

Microsoft Excel for Windows

To work around this problem, do the following:

  1. Quit Microsoft Excel and Microsoft Query.

  2. Open the Win.ini file in Notepad.

  3. Search for the [Microsoft Query] section.

  4. Add the correct path to the Msquery.exe file after the "Msquery=" line.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional query words: 1.00 5.00
Keywords : xlmac xlquery kberrmsg kbtool
Version : WINDOWS:5.0; MACINTOSH:5.0
Platform : MACINTOSH 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: February 2, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.