2 Attachment(s)
Create a Hardcoded Workbook Copy
Hi
I' getting the following error while running the trailing code. Could somebody please help me to correct the codes?
Thanks in advance
Attachment 27507
Code:
Sub Hardcoded_Workbook_Copy()
Dim FilePath As String
Dim HCName As String
FilePath = ActiveWorkbook.Path & "\"
HCName = "HC_" & VBA.Format(Date, "ddmmyy") & "_" & ActiveWorkbook.Name
ActiveWorkbook.Save
Sheets.Select
Cells.Copy
Cells.PasteSpecial xlPasteValues
Range("A1").Select
Sheets(1).Select
ActiveWorkbook.SaveAs Filename:=FilePath & HCName
End Sub