XL: Running Multiple Versions of Microsoft Excel

ID: Q166692


The information in this article applies to:


SUMMARY

Although Microsoft does not recommend installing more than one version of Microsoft Excel on a computer, it is possible to install and use more than one version. For example, you can install and use both Microsoft Excel 97 and Microsoft Excel 7.0 on the same computer.

This article describes the problems you may encounter when you install more than one version and offers advice about preventing the versions of Microsoft Excel from conflicting with each other.


MORE INFORMATION

Order of Installation

To install and use more than one version of Microsoft Excel on a single computer, install earlier versions of Microsoft Excel first.

For example, if you want to use both Microsoft Excel 5.0 and Microsoft Excel 97 on the same computer, you must install Microsoft Excel 5.0 FIRST. This is necessary because of the way registry keys, shared programs, and other settings are managed for each version of Microsoft Excel.

NOTE: The following sections assume that you installed the versions of Microsoft Excel in ascending order.

Running Multiple Versions of Microsoft Excel Simultaneously

Although it is possible to run more than one version of Microsoft Excel simultaneously on the same computer, Microsoft strongly recommends that you avoid doing this. For example, if you want to start Microsoft Excel 5.0, first quit all other versions of Microsoft Excel that may be running.

Double-Clicking Files in the Windows Explorer

When you double-click a Microsoft Excel workbook (.xls) file, chart (.xlc) file, or add-in (.xla) file in Windows Explorer, the following rules apply:

NOTE: If you double-click a file that is not supported by the version of Microsoft Excel that is running or that is automatically started, you receive the following error message:
<Filename>: file format is not valid.
If you receive this error message, start the later version of Microsoft Excel. Then, open the file by double-clicking it or by using the Open dialog box (click Open on the File menu).

Reassociating Microsoft Excel Files

When you start Microsoft Excel 5.0, Microsoft Excel files (.xls, .xlc, and .xla files) are automatically associated with it.

When you start them, Microsoft Excel 7.0 and Microsoft Excel 97 are not automatically associated Microsoft Excel files; they perform this task only when you install these programs.

Because of this difference in behavior, if you start Microsoft Excel 5.0, a Microsoft Excel file that you double-click is always opened in Microsoft Excel 5.0, unless another version of Microsoft Excel is already running.

If you want to double-click a file and open it in a newer version of Microsoft Excel, you can associate Microsoft Excel files with Microsoft Excel 7.0 or 97 by using either of the following methods.

Method 1

Run Microsoft Excel Setup or Microsoft Office Setup with the /y switch. Using /y instructs the Setup program to register all of the registry keys that are used by Microsoft Excel and to associate Microsoft Excel files with the version of Microsoft Excel that you are installing.

Method 2

Use the File Types tab in the Options dialog box to associate Microsoft Excel files with Microsoft Excel 7.0 or 97. To do this, use the following steps:

  1. Double-click My Computer.


  2. On the View menu, click Options. Then, click the File Types tab.


  3. In the list of registered file types, scroll down and click Microsoft Excel Worksheet. Then, click Edit.


  4. In the list of Actions, click Open. Then, click Edit.


  5. In the "Application used to perform action" box, change the path to the Microsoft Excel program file (Excel.exe) so that it refers to the Excel.exe file for Microsoft Excel 7.0 or Microsoft Excel 97.

    If you are unsure of the location for Excel.exe, click Browse to search for the file.


  6. Click OK. Then, click Close, and then click Close again to close the Options dialog box.


NOTE: If you use one of these methods and you start Microsoft Excel 5.0, Microsoft Excel files are automatically reassociated with Microsoft Excel 5.0. There is no way to prevent this behavior from occurring. If you want to ensure that a Microsoft Excel file is opened in a specific version of Microsoft Excel, start that version of Microsoft Excel BEFORE you open the file, or use the Open dialog box to open files.

Inserting Microsoft Excel Objects into Other Programs

If you install multiple versions of Microsoft Excel on a single computer and you insert a Microsoft Excel Worksheet object into another program (for example, Microsoft Word), the latest version of Microsoft Excel is used when you insert the worksheet object.

For example, if you install the following programs on your computer


   Microsoft Word for Windows, version 6.0
   Microsoft Excel for Windows, version 5.0
   Microsoft Excel 97 


and then insert a Microsoft Excel Worksheet object into Microsoft Word, a Microsoft Excel 97 worksheet is added.

Using Automation to Control Microsoft Excel

If you install multiple versions of Microsoft Excel on a computer, you may experience difficulty when you attempt to use Automation to control a specific version of Microsoft Excel.

For example, if you run the following Visual Basic for Applications subroutine in Microsoft Word 97


   Sub AutomationTest()
       Dim xlApp As Object
       Set xlApp = CreateObject("Excel.Application")
       MsgBox xlApp.Version
       xlApp.Quit
       Set xlApp = Nothing
   End Sub 


the subroutine always creates an Automation session in the version of Microsoft Excel that you most recently installed. So, if you install both Microsoft Excel 5.0 and Microsoft Excel 97 on the same computer, the message box in the example displays 8.0, the version number of Microsoft Excel 97.

If you want to control a specific version of Microsoft Excel using Automation, you use the class names that are listed in the following table.


   Version of
   Microsoft Excel   Class Name
   -------------------------------------

   97                Excel.Application.8
   7.0               Excel.Application.5
   5.0               Excel.Application.5 


NOTE: Microsoft Excel 5.0 and 7.0 both use the same class name, Excel.Application.5. Therefore, if Microsoft Excel 5.0 and 7.0 are both installed on the same computer, Excel.Application.5 always applies to Microsoft Excel 7.0. There is no way to prevent this behavior. Because Microsoft Excel 5.0 and 7.0 both use the same file format and offer similar features, you should be able to use Microsoft Excel 7.0 instead of Microsoft Excel 5.0.

Shared Programs

You should not experience any problems when you use shared programs, such as Microsoft Equation Editor and Clip Gallery, with any version of Microsoft Excel. Note that the Object dialog box may display more than one entry for each shared program; this behavior occurs because there may be multiple versions of the shared program on the computer.

Additional query words: XL97 XL7 XL5 ole automation


Keywords          : kbprg xlui xlvbainfo kbhowto 
Version           : WINDOWS:5.0,5.0c,7.0,7.0a,97
Platform          : WINDOWS 
Issue type        : kbinfo 

Last Reviewed: April 14, 1999