Forum Discussion
jenthevb
Jun 03, 2022Copper Contributor
VBA Error 1004 Method 'SaveAs of object '_Workbook' failed
Hello, I got the error 1004. Method SaveAs of Object '_Workbook" failed. When i check the solutions that i've found, it doesn't work. I have office 365, here is my code: Sub UpdateMaandSpS...
HansVogelaar
Jun 03, 2022MVP
Does it work if you change the SaveAs instruction to
NewBook.SaveAs Filename:="https://sharepoint.colruytgroup.com/teams/8/TI002/Planning SC_Waakdienst/" & maand & "_" & Jaar & "_" & "SC_WK.xlsx", FileFormat:= _
xlOpenXMLWorkbook, CreateBackup:=False
- jenthevbJun 03, 2022Copper Contributor
No it doesn't work. It gives the same issue. When you click on debug,
NewBook.SaveAs Filename:="https://sharepoint.colruytgroup.com/teams/8/TI002/Planning SC_Waakdienst/" & maand & "_" & Jaar & "_" & "SC_WK.xlsx", FileFormat:= _ xlOpenXMLWorkbook, CreateBackup:=False
This is code is highlighted. I've checked the url multiple times, this is correct.
Regards,
Jenthe- HansVogelaarJun 03, 2022MVP
What happens if you temporarily replace the SharePoint path with a path on your local computer?