Excel VBA SaveAs function within Box
AnsweredHello 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
-
Hi Scott, unfortunetely I opened a ticket with my companies help desk but other than that no other action yet. Hoping to have some sort of resolution. For the meantime the workaround has been to save the file to the desktop and run my file there since saving a new file to the desktop does not cause the issue.
-
So, still no resolution on this. Our internal help desk is looking into it and has already opened a case with the Box Support Team but nothing to this point has been fixed. There has been a new Software update for MacOS, Box and Excel but this same issue is present across all 3 platforms.
Please sign in to leave a comment.
Comments
4 comments