VBA Save Copy to OneDrive -- Multiple Users

kaylan

New Member
Joined
Aug 19, 2019
Messages
9
Hello,

A project I'm working on has a button that is supposed to create a static, macro free copy of the workbook and save it to the folder which is located on OneDrive. This button will be used by multiple users, not just me. I have this coded and it works perfectly whenever I test it, but when someone else tries they get Run-time error '1004'. I could just take out the part where it auto-saves and just have it create the copy, but that is not ideal and I know there has to be something I am mis-keying to cause the problem.

Here is my code for this piece of the process that works for me but no one else:

Code:
ActiveWorkbook.SaveAs FileName:="C:\Users\USERNAME\OneDrive - COMPANY NAME\Postcard Sales (" & Format(Now, "yyyy-mm-dd") & ").xlsx"

Of course I substitute my user name and company name into the file path. I did find this other thread which runs along similar lines, but applying it to my own code did not resolve the issue.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

Forum statistics

Threads
1,223,893
Messages
6,175,246
Members
452,623
Latest member
cliftonhandyman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top