Hello all, I have been using Excel VBA within box for about 4yrs now and a script that I have used in the past just stopped working 2 days ago. I am essentially using a .xlsm file as a working file and creating a data tab and then making a copy of that data tab and saving it as a stand alone file and making the format .xslx which has worked for years now and 2 days ago I am starting to get an error running this code which results in a Error 1004 SaveAs"Method Saveas of object workbook failed" but if I move the file to my desktop runs with no issues? Not sure what could be causing this but I am stuck until it is resolved.
Here is the script in case anyone wants to see what is happening. FYI - This is being done on a Mac computer.
Sub Create_Upload()
Dim RelativePath As String, DT As String, WbNam As String, ws1 As Worksheet
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Set ws1 = Sheets("Actuals Data")
RelativePath = ThisWorkbook.Path & "/"
DT = Format(CStr(Now), "mm_dd_yyyy hh.mmam/pm")
WbNam = "Submission Template " & " - " & DT 'Creates the File Name
ws1.Copy 'Copies the entire sheet into a new workbook
ActiveWorkbook.SaveAs fileName:=RelativePath & WbNam & ".xlsx", FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
ActiveWorkbook.Close Save
MsgBox "Submission file saved to the folder where this tool resides."
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub