Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Jan 2001
    Location
    Chantilly, VA USA
    Posts
    54
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Save Directory in Excel 97 (Office 97 SR2)

    I often open an Excel workbook, and want to save it in the same directory with a different name.

    I'd like to be able to set the Default Save Directory to be the current directory, whatever that may be.

    I know how to change the Default Save Directory ("Default File Location") to some specific directory via Tools > Options..... but is there a way to make it the "current" directory?

    [I realize a workaround would be to go into Windows Explorer.... copy and paste the file, then rename it, then open it........ but that's a lot of extra steps!]

    Thanks for the help,

    Don

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Default Save Directory in Excel 97 (Office 97 SR2)

    As far as I know, there is no what to change the default to anything other than the fixed directory specified in the Options. What you can do is write code for the Workbook BeforeSave event that would save the file to the directory that you want it to go to when the save is a SaveAs. However, this code would have to be in every workbook. I haven't tried, but that might be accomplished by putting the code into the Book.xlt template, but I have never tired doing that.
    Legare Coleman

  3. #3
    Star Lounger
    Join Date
    Jan 2001
    Location
    Adelaide, South Australia
    Posts
    85
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Default Save Directory in Excel 97 (Office 97 SR2)

    To get around this problem, I have a custom button on my toolbars that points to the following code (which I have in an add-in):
    Sub SetDirectory()
    If ActiveWorkbook.Path = "" Then
    MsgBox "Active workbook has not been saved yet, so I am unable to set the path to its directory", vbOKOnly + vbExclamation
    Else
    ChDrive Left(ActiveWorkbook.Path, 2)
    ChDir ActiveWorkbook.Path
    End If
    End Sub

    All this does is set the current path to the path of the active workbook.

    Let us know if you need more info.

    Jon

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •