I wonder how to protect a workbook with a password leveraging macro. I am looking for a method to utilize Record Macro to make it happen without using codes in VBA. I’ve tried several ways but none of them worked.
Click Record Macro from the View menu
Select Store macro in as This Workbook / Personal Macro Workbook
Select the Review menu > click the Protect Workbook menu
Add Password (option) and Verify > click OK (Keep the Protect structure check box selected)
Moving back to the View menu and click Stop Recording
- Moving back to the Review menu and click Unprotect Workbook
- Input Password, then it works
Click View Macros from the View menu, select the Macro name, and run
Select the Review menu and click Unprotect Workbook again
The password window doesn’t pop up, instead step #4 pops up
The issue I’m encountering is that the password isn’t working for the second time and beyond. If there is no way to record a password by macro, but it’s possible to do by VBA, please let me know.