You really want "users" to have to know passwords and then remove them and add them back in? Letting them do that will seriously give them the ability to lock YOU out of their sheet.
Wouldn't it be better to simply allow your macro to work on the sheet without unprotecting it?
To do that, put this macro into the ThisWorkbook module:
Be sure to put in the correct password, the red code is the part that makes the "Data" sheet able to run macros even though it's protected.
Once the macro is installed, save your sheet, close it, then reopen it, that will set the flag properly.
Bookmarks