Tested.
![]()
Private Sub CommandButton1_Click() Dim fs As FileSystemObject Dim bkupFile As File Dim FileNameAndPath As String FileNameAndPath = "C:\Temp\foo.xls" Set fs = CreateObject("Scripting.FileSystemObject") Application.ActiveWorkbook.SaveAs "C:\temp\bar.xls" Set bkupFile = fs.GetFile("C:\temp\bar.xls") bkupFile.Copy FileNameAndPath, True 'Memory Cleanup Set bkupFile = Nothing Set fs = Nothing End Sub
Bookmarks