PDA

View Full Version : Sleeper: Keep a timestamped log when any worksheet is unprotected?



hb64099
04-10-2020, 08:29 AM
Hello;

Is there any way to keep a background log that records any time any worksheet is unprotected?

I've got a pretty complex sheet that reapplies various protections to each worksheet when it's saved or opened, and we keep a pretty tight hold on what the super-duper-secret password is, but things always leak out... so I'm curious to know if there's any way to record the unlocking/unprotecting process?

Zack Barresse
04-10-2020, 10:07 AM
Unfortunately there is no event like this. There are some possible workarounds though.


Remove protect/unprotect ribbon controls in that workbook
Hide worksheet tabs so users can't right-click them
Have a xlVeryHidden worksheet with a password generator
Tap into other events to periodically check the state of protection, then report on it


Each have their own drawbacks. Removing ribbon controls is easy, but a skilled user can always add them back. A skilled user could also use keyboard shortcuts. Passwords are notoriously unsafe in Excel as they use a hash, based on MD5, which is fairly easy to crack if you know how.

I would probably start with removing those controls from the ribbon and hiding the worksheet tabs. You'd have to give the users some kind of navigation though, which is easy enough - add shapes with hyperlinks to those sheets. I've done this a lot, and usually put them at the top of the sheet, set to not move or size with cells, and color-coordinate them by the active sheet. This is fairly easy to setup. If this proves not enough, I'd move to utilizing other events to check on it.