Results 1 to 3 of 3

Thread: Saving a copy with date problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Saving a copy with date problem

    Need some help please...
    made a buttone with code i found to save a copy with current date for an archive folder. works great!
    problem is the changes i do in the worksheet arnt saved in original file. need to save both...

    need do either:
    - save 2 copys in 2 difrent folders (add another path to the code - FOLDER02)
    - write the code so it saves on the original file and a copy to the rchive folder

    Any ideas??


    This is the code i use:
    -----------------------------------

    Sub SaveArchive()
    
    
    Dim dtDate As Date
    dtDate = Date
    
    
    Dim strFile As String
    strFile = "C:\Users\shay\Desktop\FOLDER01\FILENAME" & Format(dtDate, " dd.mm.yyyy") & ".xlsm"
    
    
    ActiveWorkbook.SaveAs Filename:=strFile, FileFormat _
        :=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
    
    
    End Sub
    --------------------------------------
    Last edited by SamT; 09-17-2015 at 02:26 PM. Reason: Used # icon to add Code Tags around sub

Posting Permissions

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