Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    3 Star Lounger
    Join Date
    Jan 2004
    Location
    Las Vegas, Nevada, USA
    Posts
    342
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Save instead of Save As (XP/2003)

    Dumb question – I already know the answer, but I will ask anyway.

    I frequently change an Excel file for the next month by removing data from existing file,
    changing the date references (i.e. Change from October to November).
    Then I will do a “Save As” renaming it to the appropriate month.

    Every once in a while I have a senior moment and I hit “Save” rather then “Save As”.
    Now all my previous month’s information vanishes in a puff of computer dust.

    Just after the “OHHHH NOOOO” <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23> , is there any way to retrieve the now written over file?
    I know – I know, backups are made for senior moments.
    Now just to remember to backup.

    Just thought I would ask if there is a “magic wand” out there.
    Richard Spring

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Save instead of Save As (XP/2003)

    That's what templates are for.
    Take an existing workbook.
    Remove the data.
    Save it as an Excel template (.xlt).
    Now, when you need a workbook for a new month, don't open the one from the previous month, but select File | New..., then click General Templates (for Excel 2002) or Templates on My Computer (for Excel 2003), and select the template. Excel will create a *new* workbook based on the template.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2004
    Location
    Las Vegas, Nevada, USA
    Posts
    342
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Save instead of Save As (XP/2003)

    MUST remember Templates!
    Will setup a Template to eliminate the problem.

    Thanks for the help
    Richard Spring

  4. #4
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Save instead of Save As (XP/2003)

    The general question is still valid though.

    For example I maintain an "action list". Each time we discuss the entries on the list I mark some as complete, delete some very old ones, add a few more and save it with the date in the filename. I can't use a template as I need to use the data from the previous version each time.

    Yes, I have (very occassionally) had to get the data back from a backup when I clicked Save by accident - so far a backup has always been available.

    StuartR

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Save instead of Save As (XP/2003)

    At home, a backup is probably the only fallback. On a corporate network, one may have the luxury of being able to have several previous versions (shadow copies) at ones disposal.

  6. #6
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Save instead of Save As (XP/2003)

    I find it best if one is going to do this, is to, as soon as the file is opened, to SAVE AS. Then if is it SAVED by accident it makes no difference. Once it is SAVED with a new name, it can be safely changed, and when Saved or Saved As it will not overwrite the original.

    Steve

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Save instead of Save As (XP/2003)

    That, or make a copy of the file in Windows Explorer.

  8. #8
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Save instead of Save As (XP/2003)

    Can we not hijack the Save function on a specific file and SaveAs instead ?
    Regards
    Don

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Save instead of Save As (XP/2003)

    This is not as easy in Excel as it is in Word, where you simply create a macro named FileSave.

    But I don't think it's desirable to force a Save As under all circumstances: once the workbook has been saved under a new name, subsequent saves (after editing it), the Save command should work as usual.

    And one may not always want to have macros in a workbook.

  10. #10
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Save instead of Save As (XP/2003)

    Hi Hans
    I attempted it anyway; and of course failed. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15> But can you advise me why the following code crashes Excel when the user opts to change the filename, yet works properly when responding "No" to the first question?

    <pre>Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    Dim strFN As String


    Application.EnableEvents = False

    'Give the user a choice
    If MsgBox("It is assumed that you wish to ""SaveAs""." _
    & vbCrLf & "Is this assumption correct?", _
    vbQuestion + vbYesNo, "Save Alternative") = vbNo Then
    strFN = ThisWorkbook.FullName
    Else
    Do While Right(strFN, 4) <> ".xls"
    strFN = InputBox("Using an ""xls"" extension, " _
    & "enter the filename you wish to use for this file.", _
    "Save As")
    Loop
    strFN = ThisWorkbook.Path & "" & strFN
    End If

    ' In case the user cancels after attempting with an in-use name
    On Error Resume Next
    ActiveWorkbook.SaveAs Filename:=strFN, FileFormat:=xlNormal, Password:="", _
    WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:=False
    On Error GoTo 0
    DoEvents
    Application.SendKeys ("{ESC}")
    Application.EnableEvents = True

    End Sub
    </pre>

    Regards
    Don

  11. #11
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Save instead of Save As (XP/2003)

    I would find such code infuriating - I don't want to see that message box each time I save a workbook!

  12. #12
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Save instead of Save As (XP/2003)

    Thanks Hans
    Point taken.
    Regards
    Don

  13. #13
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Save instead of Save As (XP/2003)

    I always (endeavor to) make sure I have the "Always create backup" option selected - at least then, if I make only the initial Save, I have only to go to the .bak file.

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

    Re: Save instead of Save As (XP/2003)

    In this particular case, since the workbook is being named to a month that is also included in a cell, the code could check to see if the month in the cell is different than the month in the file name and only do the SaveAs if they are different.
    Legare Coleman

  15. #15
    3 Star Lounger
    Join Date
    Jan 2004
    Location
    Las Vegas, Nevada, USA
    Posts
    342
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Save instead of Save As (XP/2003)

    I like Steve’s idea of “Save As” as soon as you open it.
    Hans - what do you mean about “That, or make a copy of the file in Windows Explorer”? Not sure how you would do that.
    Leif - where is the “I always (endeavor to) make sure I have the "Always create backup" option selected - at least then,
    if I make only the initial Save, I have only to go to the .bak file.” Where is the option located and how do you use it?
    Richard Spring

Page 1 of 2 12 LastLast

Posting Permissions

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