XL5: Hierarchy of Methods to Change the Working Directory

Last reviewed: September 12, 1996
Article ID: Q110209
The information in this article applies to:
  • Microsoft Excel for Windows, versions 5.0, 5.0c

SUMMARY

In Microsoft Excel, you can set the working directory without quitting the program.

To set the working directory from within Microsoft Excel:

   1. From the Tools menu, choose Options.

   2. Select the General tab.

   3. In the Default File Location box, type the path for your working
      directory.

   4. Choose OK to accept the change.

When you make this change, the following line is added to your EXCEL5.INI file:

   DefaultPath= <path>

When you make this change, you must start Microsoft Excel again to verify the new default file location. After Microsoft Excel starts, choose Open from the File menu. In the Open dialog box, under Directories, you should see the new path to the working directory.

MORE INFORMATION

Although setting the default file location in the Microsoft Excel Options dialog box overrides the Working Directory setting specified in Program Item Properties in Program Manager, this change does not override the use of a startup switch ("excel /p <path>") in the command line, nor does it override an OpenDir=<path> statement in the EXCEL5.INI file.

The order of precedence for the methods to change the working directory in Microsoft Excel version 5.0 is as follows:

  • Using a startup switch (such as /p <path>) in the Command Line box in the Program Item Properties box in Program Manager.

    NOTE: This method overrides all other methods mentioned

  • Adding an OpenDir=<path> line to the EXCEL5.INI file.
  • Setting the default file location on the General tab in the Microsoft Excel Options dialog box.
  • Specifying the working directory in the Working Directory box in the Program Item Properties box in Program Manager.

NOTE: When you first install Microsoft Excel 5.0, if an EXCEL4.INI file exists on your computer and if this file contains an OpenDir=<path> statement, the Setup program will set the DefaultPath= statement in the EXCEL5.INI file to the path specified in the EXCEL4.INI file.


KBCategory: kbusage
KBSubcategory:

Additional reference words: 5.00 5.00c current dir start pathname



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: September 12, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.