Excel: Opening File from Finder Doesn't Set Directory

Last reviewed: October 7, 1997
Article ID: Q75608
3.00 MACINTOSH kbother

SUMMARY

If Microsoft Excel for the Macintosh version 3.0 is being used with System 7.0, Excel will not set the active directory to the one where the file is located if the file is opened from the Finder. To avoid this behavior, open the file from within Excel by choosing the Open command from the File menu.

MORE INFORMATION

For a solution to this problem, please contact Product Support directly at 425-635-7080.

The following macro commands provide a workaround to this problem. This macro can be used to set the active folder when a file is double-clicked in order to launch Excel:

   +---+-------------------------------------------------------------+
   |   |               A                                             |
   +---+-------------------------------------------------------------+
   | 1 | Auto_Open                                                   |
   +---+-------------------------------------------------------------+
   | 2 | =ON.WINDOW(,"Set_Directory")                                |
   +---+-------------------------------------------------------------+
   | 3 | =RETURN()                                                   |
   +---+-------------------------------------------------------------+
   | 4 |                                                             |
   +---+-------------------------------------------------------------+
   | 5 | Set_Directory                                               |
   +---+-------------------------------------------------------------+
   | 6 | =IF(ISERROR(FIND(":",GET.DOCUMENT(2))),GET.DOCUMENT(2)&":", |
   |   |  GET.DOCUMENT(2))                                           |
   +---+-------------------------------------------------------------+
   | 7 | =DIRECTORY(A6)                                 |
   +---+-------------------------------------------------------------+
   | 8 | =ON.WINDOW()                                                |
   +---+-------------------------------------------------------------+
   | 9 | =RETURN()                                                   |
   +---+-------------------------------------------------------------+

  • Enter these macro commands on a macro sheet.

  • Select cell A1, and choose Define Name from the Formula menu.

  • In the Name box, type "auto_open" (without quotation marks). Click OK.

  • Select cell A5, and choose Define Name from the Formula menu.

  • In the Name box, type "Set_Directory" (without quotation marks). Click OK.

  • From the File menu, choose Save As.

  • Click the Options button.

  • From the File Format list, select Add-In. Click OK.

  • For the file's destination, choose the Excel Startup Folder, give the file a name, and click the Save button.


  • KBCategory: kbother
    KBSubcategory:

    Additional reference words: 3.0 3.00 incorrect wrong application


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