tonymaclaren
New Member
- Joined
- Dec 16, 2018
- Messages
- 3
I desperately hope someone can help.I have some simple VBA code that makes a copy of a worksheet and saves it to a shared folder on Business OneDrive, the main bit of code is just:
Sheets("Data").Select
Sheets("Data").Copy
ActiveWorkbook.SaveAs Filename:="https:// blah /bla".
, FileFormat:=6, CreateBackup:=False
It works perfectly.BUT when I share the folder for my client, it asks for credentials for the correct directory on OneDrive and then gives the error error "1004 method save as of object workbook failed". I should add the client can view the same shared directory and upload the same file manually with no problem whatsoever !
It is not a .csv problem as I originally thought because the same problem occurs with .xlsx in testing.
Sheets("Data").Select
Sheets("Data").Copy
ActiveWorkbook.SaveAs Filename:="https:// blah /bla".
, FileFormat:=6, CreateBackup:=False
It works perfectly.BUT when I share the folder for my client, it asks for credentials for the correct directory on OneDrive and then gives the error error "1004 method save as of object workbook failed". I should add the client can view the same shared directory and upload the same file manually with no problem whatsoever !
It is not a .csv problem as I originally thought because the same problem occurs with .xlsx in testing.