Not sure what you want to do but if you want to change permissions on files on your local drive using macro then see https://www.techonthenet.com/excel/formulas/setattr.php
How to remove read only permission for Excel file?
Referring to following online file, I would like to know on how to remove read only permission for Excel file using macro.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Microsoft 365 and Office | Excel | For home | Windows
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
16 answers
Sort by: Most helpful
-
Anonymous
2019-12-25T03:25:53+00:00 -
Anonymous
2019-12-25T05:54:12+00:00 I try following coding to set into normal, but when I open this file, it still pop up read only message.
Do you have any suggestions on how to remove read only attribute using macro?
Thank you very much for any suggestions (^v^)
Sub Normal()
SetAttr "C:\Test.xls", vbNormal
End Sub
-
Anonymous
2019-12-25T14:10:14+00:00 I tested the code and it worked for me.
Please describe the steps you are taking to reset the attribute.
I created Test.xlsx in C:, set it to Read Only in File Explorer, added your code (just changed .xls to .xlsx) to a new Excel file and ran the code... it removed the Read Only setting...
BEFORE Running the Code
AFTER Running the Code
-
Anonymous
2019-12-25T15:42:50+00:00 There is some special attribute for read only, please download my linked file again, under property, read only is unchecked, but when I open this file, it pops up a read only message.
Do you have any suggestions on what attribute is about?
Thank you very much for any suggestions (^v^)
-
Anonymous
2019-12-26T05:32:21+00:00 Can you share a screenshot? Looks like you are getting a security warning one gets while opening files downloaded from internet.