Hi all,
Today I tried to run a macro that used to run fine about 3 years ago but which now fails with a run-time error 1004 saying "cannot access [filename]". The line of code that fails is:
The variable FileToSave has the correct value of the activeworkbook: V702 K&C Summary.xlsx. This file was created and previously saved using the same line of code in a previous sub, so this is the second time I'm asking for the file to be saved to the same folder.
The whole macro and all related workbooks are running locally on my machine and this workbook in question is stored at this folder address in Windows Explorer: C:\Users\My Name\OneDrive - Company Name\Desktop\K&C ASCII Data for Tracking Sheet\702_ascii (I've edited the link only to hide names).
However, interrogating the file info shows the full file path to be:
(I've had to put this in code because I can't work out how to stop the post window from automatically wrapping it in [url]).
The use of OneDrive and Sharepoint are probably the only changes to the way this macro functions since last using it, but I have no understanding of these things or the significance of them.
I'm currently working off site and using a VPN, but switching that off had no effect on the problem.
I'd appreciate any help on how to resolve this so that I can use the macro to continue to save the file repeatedly in a local folder.
Thanks.
Bookmarks