Hi there,
I have a macro like this which saves workbook to new location, and works fine. But I need to change this code to save only ACTIVE Sheet, not all of them. Basically I need macro to do 1 to 1 copy of active sheet in different location and will rename the file to original workbook name with date and time. Can anyone help me with this?
Sub SAVE_TO_ARCHIVE()
' Saves active file to current plus backup location, appends system date and time in front of file name in backup locations.
Dim datim As String
datim = Format(CStr(Now), "yyyy_mm_dd_hh_mm_ss_")
ActiveWorkbook.SaveCopyAs "E:\****pack\KAROL_KITPACK_DOWNTIME_TEMP\ARCHIVE\" & datim & ActiveWorkbook.Name
ActiveWorkbook.Save
MsgBox "You can find archived files in E:\****pack\KAROL_KITPACK_DOWNTIME_TEMP\ARCHIVE\ " & FolderName
Application.ScreenUpdating = True
End Sub
I have a macro like this which saves workbook to new location, and works fine. But I need to change this code to save only ACTIVE Sheet, not all of them. Basically I need macro to do 1 to 1 copy of active sheet in different location and will rename the file to original workbook name with date and time. Can anyone help me with this?
Sub SAVE_TO_ARCHIVE()
' Saves active file to current plus backup location, appends system date and time in front of file name in backup locations.
Dim datim As String
datim = Format(CStr(Now), "yyyy_mm_dd_hh_mm_ss_")
ActiveWorkbook.SaveCopyAs "E:\****pack\KAROL_KITPACK_DOWNTIME_TEMP\ARCHIVE\" & datim & ActiveWorkbook.Name
ActiveWorkbook.Save
MsgBox "You can find archived files in E:\****pack\KAROL_KITPACK_DOWNTIME_TEMP\ARCHIVE\ " & FolderName
Application.ScreenUpdating = True
End Sub