HOW TO UNLOCK AN EXCEL FILE LOCKED FOR EDITING CODE
Step 5: After pasting this code in Module 1, click on the RUN button on top. Step 4: Double click on the module and paste the code. Step 3: Now, we can see that a new module has been added as Module 1 on the left-hand side of the panel. Step 1: Click on Visual Basic under the Developer tab. But using VBA code, we can protect all the sheets in few seconds all you need to do is copy the below code and paste it into the VBA editor. What if you have many sheets? Can you keep protecting the sheets one by one? It is a herculean task to do. #1 – Protect Multiple sheets Using Excel VBA Code How to Protect and Unprotect Multiple Sheets using Excel VBA Code?īelow are the steps to protect and unprotect multiple sheets using VBA Code in Excel. Step 4: If the password is correct, you can make changes, or else it will say Password is Incorrect. Step 3: After the password is entered, click on OK. Step 2: As soon as you click on Unprotect, it will ask you to enter the same password which you have typed while protecting the sheet. Step 1: Go to the Review tab & click on Unprotect Sheet. Follow the below steps to unprotect the excel sheet. If you want to make changes, you need to unprotect the sheet first and make changes in excel. Now we have protected our sheet, which restricts the users from modifying the document. The only thing they can do is they can insert a new sheet and only work on that newly inserted sheet only. In this sheet, users cannot do anything else apart from seeing the data. Re-enter and click on OK to complete the process. Step 5: It will ask you to re-enter the password one more time. Step 4: At the same time, we can allow a user to make some kind of changes like Insert Hyperlink, Insert row or column, etc… If you allow them to make changes, you need to select those options under “ Allow all users of this worksheet to.”Click on OK.