Microsoft KB Archive/170680

= MS Query Doesn't Work After Installing Visual Basic 5.0 =

Article ID: 170680

Article Last Modified on 8/17/2005

-

APPLIES TO


 * Microsoft Excel 95 Standard Edition
 * Microsoft Visual Basic 5.0 Enterprise Edition
 * Microsoft Query 2000

-



This article was previously published under Q170680



SYMPTOMS
In Microsoft Excel 7.0, if you click either Get External Data or "Refresh Data on the Data menu," you may receive the following error messages:

Error Starting Program

A required .DLL file, MSO97RT.DLL, was not found.

-and-

Microsoft Excel

Cannot execute MSQRY32.EXE.

-and-

Microsoft Excel

Couldn't restore connection to original database. Data not restored.



CAUSE
You receive these error messages if you install Microsoft Visual Basic 5.0, Enterprise Edition, and Microsoft Excel 7.0 on the same computer.

Specifically, the problem occurs because Microsoft Visual Basic 5.0, Enterprise Edition, includes new versions of the following Microsoft Query files:

Msqry32.exe

Qryint32.dll

These new files are not compatible with Microsoft Excel 7.0.

Note that the problem does not occur if you install Microsoft Visual Basic 5.0, Professional Edition. Note also that the order in which you install the programs does not matter.



WORKAROUND
To work around this problem, remove the new copies of Msqry32.exe and Qryint32.dll, and then replace them with the Msqry32.exe and Qryint32.dll files included with Microsoft Excel 7.0. To do this, use either of the following methods.

Method 1
Copy the Msqry32.exe and Qryint32.dll files from a computer on which Microsoft Excel 7.0 is installed to the following folder on your computer:

C:\Program Files\Common Files\Microsoft Shared\Msquery

Replacing the newer versions of the files with the earlier versions should eliminate the problem.

Method 2
To use this method, follow these steps:
 * 1) In Windows Explorer, open the Msquery folder on your computer.
 * 2) Rename the existing copies of Msqry32.exe and Qryint32.dll.
 * 3) On the Start menu, point to Settings, and click Control Panel.
 * 4) Double-click Add/Remove Programs.
 * 5) In the list of installed programs, click Microsoft Office Professional or Microsoft Office Standard. Then, click Add/Remove.
 * 6) When it appears, click Reinstall.

When you reinstall Microsoft Office, new copies of the Msqry32.exe and Qryint32.dll files are installed into the correct folder on your computer.

NOTE: If you do not rename the existing copies of the files first (see steps 1 and 2), this process does not work.



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.



MORE INFORMATION
In Microsoft Excel 7.0, when you click Get External Data or Refresh Data on the Data menu, Microsoft Excel invokes an instance of Microsoft Query, which performs the process of querying and updating the data.

Because the Microsoft Query files included with Microsoft Visual Basic 5.0, Enterprise Edition, are incompatible with Microsoft Excel 7.0, you may not be able to perform new queries (Get External Data) or update existing queries (Refresh Data) if you install both programs on the same computer.

Additional query words: XL7 7.00a MSO97RT DLL MSQRY32 EXE XL7

Keywords: kberrmsg kbprb kbusage KB170680

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.