Forum Discussion
BartH_NL
Sep 06, 2022Copper Contributor
Excel disable Read-Only from SharePoint with VBA
Hello Group, We have a lot of Excel files that are saved with "read-Only recommended". I would like to open files with VBA and also capture the click on "Edit Anyway" in code. I ...
Fuzz_ZA
Jun 20, 2024Copper Contributor
BartH_NL I’ve been bashing my head against this issue for 2 days and thought I’d share a solution that worked for me.
After invoking the Excel.Application and workbook to open (with the ReadOnly parameter set to False), execute the following method:
exApp.ActiveWorkbook.LockServerFile()
You will immediately see your visible Excel remove the read only banner and you can merrily save. This method changes the ReadOnly flag from True to False.
Hope this helps.