Hi, I wonder if anyone has questioned this.
In one of the files I helped a friend with the worksheets are protected using the UserInterfcaeOnly parameter so that working with it is not too difficult and you can easily avoid users accidentally delete cells with formulas or other things.
He does allow the users to unlock unprotect the worksheet using a button that serves as a toggle to unprotect/protect the worksheet.
The problem is that if a user protects the worksheet manually via de ribbon option or right-click on the tab the VBA routine will not work if it's a different password, so whole toggle button and the userinterfaceonly becomes useless.
Is there a way to disable the protect worksheet and workbook options for this particular file, some on workbook_open trigger to run a macro that takes care of this?
Versions of Excel are 2021 and 365 but mainly 2021
Thanks,
Hans
You can use Ribbon XML to disable or intercept those commands. Ron de Bruin's old Ribbon pages are now hosted on Jan Karel Pieterse's website thankfully: https://jkp-ads.com/rdb/
Thank you Veouria,
I'll take a look there didn't think of it.
I used RdB's tips often bue didn't realize JPK stated hosting them for him