XL2000: Startup Switches for Microsoft Excel 2000

ID: Q211481


The information in this article applies to:
  • Microsoft Excel 2000


SUMMARY

Microsoft Excel accepts a number of optional switches that you can use to control how Excel starts. This article lists the switches and provides a description of each switch.


MORE INFORMATION

Switches

The following table lists the switches you can use to control how Excel starts. Switches are not case sensitive: /O is the same as /o. In some cases, you can use more than one switch at a time. If you do this, you must separate the switches with spaces, for example: /o /s

   Switch           Function
   ---------------------------------------------------------------------- 

   /e, /embedded    Forces Excel to start without displaying the 
                    startup screen and creating a new workbook 
                    (Book1.xls).

                    Example: /e, /embedded 

   /m               Forces Excel to create a new workbook that
                    contains a single macro sheet.

                    Example: /m

   /o               Forces Excel to re-register itself. Specifically, 
                    the following key is rewritten in the registry:

                    HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Excel

                    NOTE: If this key contains invalid values, they are
                    not corrected by using this switch. This switch only
                    replaces missing values.

                    Example: /o

   /p <folder>      Forces Excel to use the path you specify as the active
                    path rather than the default path. 

                    Example: /p "C:\Windows"

   /r <filename>    Forces Excel to open the specified file in
                    read-only mode.

                    Example: /r "C:\My Documents\Test.xls"

   /s               Forces Excel to bypass all files in the <Windows
                    Dir>\Application Data\Microsoft\Xlstart folder or the 
                    alternate startup file location. It also forces Excel 
                    to bypass the toolbar file (Excel.xlb or 
                    <username>.xlb). You will see "Safe Mode" in the 
                    Excel title bar. Use this switch when you want to 
                    start Excel in safe mode.

                    Example: /s 

   /regserver       Forces Excel to register itself and then quit. Use this 
                    switch when you want Excel to rewrite all of its 
                    registry keys and reassociate itself with Excel files, 
                    such as workbooks, charts, and so on.

                    Example: /regserver


   /unregserver     Forces Excel to unregister itself and then quit.

                    Example: /unregserver 

Using Switches When You Start Excel

Adding a Switch to the Microsoft Excel Shortcut

To add a switch to the Microsoft Excel shortcut:
  1. Right-click Start on the taskbar, and click Open on the shortcut menu.


  2. Double-click the Programs folder. Right-click the shortcut for Microsoft Excel, and click Properties on the shortcut menu.


  3. Click the Shortcut tab.


  4. In the Target box, type the switches you want after the command that runs Excel.exe. For example, if you want Excel to start without creating a new workbook, and the Excel.exe file is installed in the default location, you would type the following in the Target box:


  5. "C:\Program Files\Microsoft Office\Office\Excel.exe" /e
    NOTE: If the options on the Shortcut tab in the Properties dialog box are unavailable, your shortcuts are Windows installer shortcuts. To modify these shortcuts, please click the article number below to view the article in the Microsoft Knowledge Base:
    Q229396 OFF2000: Unable to Modify Office Shortcuts
  6. Click OK.


Running Excel One Time with a Switch by Using the Command Line

If you want to run Excel with a switch occasionally, you can add the switch to the command line. To do this:
  1. On the Start menu, click Run.


  2. In the Open box, type the path to Excel.exe and add the switch you want to use at the end of the command line. For example, if you want to bypass all files in the startup folders and the Excel.exe file is installed in the default location, you would type the following command:


  3. "C:\Program Files\Microsoft Office\Office\Excel.exe" /s
  4. Click OK.


Additional query words: starting start up startup XL2000 launching running activating command-line

Keywords : xlui
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbhowto


Last Reviewed: October 28, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.