Results 1 to 4 of 4

Saving file to its current location and current file name with current date and "FINAL"

Threaded View

  1. #3
    Registered User
    Join Date
    08-20-2012
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Saving file to its current location and current file name with current date and "FINAL

    Holger....Wow...thanks it really does work.. thanks again.. can I ask a another one? What would be the code If i just wanted to create a backup copy in the same location with this filename --- "Myfile_08202012_backup". I don't want my active workbook to save into this backup filename as I'd like to use the code the one for "FINAL". Basically, I just need a macro the saves a backup so when I run the final one and locked the entire workbook, I know I have a backup copy which is unlocked/unprotected. Hope this is clear...

    this is the code i hav

    With ActiveWorkbook
      .SaveAs .Path & "\" & Left(.Name, Len(.Name) - 5) & Format(Date, "_yyyymmdd") & "_backup", FileFormat:=51
        End With
    
    
        For Each ws In ActiveWorkbook.Worksheets
            ws.Protect Password:="password"
            Next ws
            
        With ActiveWorkbook
      .SaveAs .Path & "\" & Left(.Name, Len(.Name) - 5) & Format(Date, "_yyyymmdd") & "_FINAL", FileFormat:=51
        End With
    The proplem is when it ran the Final save... the filename becomes like this "myfile_08202012_backup_08202012_FINAL.xlsx" I just need the final one say myfile_08202012_FINAL.xlsx



    Quote Originally Posted by HaHoBe View Post
    Hi, ironwill20,

    *.xlsx will not support macros. It could be done like

    With ActiveWorkbook
      .SaveAs .Path & "\" & Left(.Name, Len(.Name) - 5) & Format(Date, "_yyyymmdd") & "_FINAL", FileFormat:=51
    End With
    Ciao,
    Holger
    Last edited by ironwill20; 08-21-2012 at 03:00 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1