rjplante
Well-known Member
- Joined
- Oct 31, 2008
- Messages
- 569
- Office Version
- 365
- Platform
- Windows
I have the following code for a save as macro.
When I run it it flags the "ActiveWorkbook.SaveAs FileName:=FSName, FileFormat:=52" line and throws the Run-time error '1004' Method 'SaveAs' of object '_Workbook' failed.
The text in the cell DP6 = G:\HR\Employees\Evals\Duck_Donald_25-JUN-2019.xlsm
What is causing this error? Could it be related to the folder security settings?I appreciate any help on what this error means and how to correct it.
Thanks for all help provided.
Robert
Code:
Sub SAVE_EVAL()
Application.ScreenUpdating = False
Dim FSName As String
' File name in this cell is a formula that includes .xlsm at the end of the string
FSName = Sheets("Intro Page").Range("DP6").Value
ActiveWorkbook.SaveAs FileName:=FSName, FileFormat:=52
Application.ScreenUpdating = True
End Sub
When I run it it flags the "ActiveWorkbook.SaveAs FileName:=FSName, FileFormat:=52" line and throws the Run-time error '1004' Method 'SaveAs' of object '_Workbook' failed.
The text in the cell DP6 = G:\HR\Employees\Evals\Duck_Donald_25-JUN-2019.xlsm
What is causing this error? Could it be related to the folder security settings?I appreciate any help on what this error means and how to correct it.
Thanks for all help provided.
Robert
Last edited: