Cannot Change Read-Only Status of Folder for Saving Files in Excel VBA on Windows 11 Pro.
N. Manganaro
0
Reputation points
I'm running Win 11 Pro, Microsoft® Excel® for Microsoft 365 MSO (Version 2412 Build 16.0.18324.20092) 64-bit.
I am having a problem saving a file using VBA now using the code below, although the macro used to work without a problem.
ActiveWorkbook.SaveAs Filename:=toPaths(i), FileFormat:=xlCSVUTF8, _
CreateBackup:=False
ActiveWindow.Close
```I'm getting an error that says "filexyz.csv cannot be accessed. The file may be corrupted, located on a server that is not responding, or read-only."
If I stop the macro, I can manually save the file where I want.
I checked the properties of the folder where I want to put it, and it says it's read-only. If I un-click the read-only box, even acting as an administrator, that change is not permanent. If I go look at the properties again, it says it's read-only.
I also made sure I had read-write control on the folder, but that does not stay set as I want it.
What can I do?
Sign in to answer