I have been working on a long/multiple macro and have finally gotten it where I want and decided it would be nice to add the final save as to the end.
I have two options that I have put together but neither work fully and I'm not sure what I am missing.
Please help and thank you for any guidance anyone can provide!!!
My goal is to take the macro enabled wb from my desktop folder and save it as a typical .xlsx wb on a shared drive.
Option 1: This saves as a file not as an excel sheet.
Option 2: This saves as a .xlsx, but upon opening the file states the extension is currupted.
I have two options that I have put together but neither work fully and I'm not sure what I am missing.
Please help and thank you for any guidance anyone can provide!!!
My goal is to take the macro enabled wb from my desktop folder and save it as a typical .xlsx wb on a shared drive.
Option 1: This saves as a file not as an excel sheet.
VBA Code:
Dim wb As String
wb = Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 5)
ActiveWorkbook.SaveAs Filename:= _
"R:\Destination File Path\" & wb, FileFormat:=51, _
CreateBackup:=False
MsgBox "The file has been saved"
Option 2: This saves as a .xlsx, but upon opening the file states the extension is currupted.
VBA Code:
Dim wb As String
wb = Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 5)
ActiveWorkbook.SaveCopyAs Filename:= _
"R:\Destination File Path\" & wb & ".xlsx"
MsgBox "The file has been saved"