0% found this document useful (0 votes)
37 views

Unprotect Multiple Sheets at Once With VBA Code

This document provides a VBA code to unprotect multiple Excel sheets at once. The code prompts the user to enter a password, then uses a For loop to unprotect each worksheet in the active workbook using that password. If any sheet has a different password, it will display an error message. This allows users to quickly unprotect multiple password-protected sheets with one click rather than doing each sheet individually.

Uploaded by

documentatii.ha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

Unprotect Multiple Sheets at Once With VBA Code

This document provides a VBA code to unprotect multiple Excel sheets at once. The code prompts the user to enter a password, then uses a For loop to unprotect each worksheet in the active workbook using that password. If any sheet has a different password, it will display an error message. This allows users to quickly unprotect multiple password-protected sheets with one click rather than doing each sheet individually.

Uploaded by

documentatii.ha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Unprotect multiple sheets at once with VBA code

I. If you are good at VBA code, the following code may be help you quickly to unprotect
multiple sheets at once.
II. 1. Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for
Applications window.
III. 2. Click Insert > Module, and paste the following code in the Module Window.

Sub unprotect_all_sheets()
On Error Goto booboo
unpass = InputBox("Please enter the password:")
For Each Worksheet In ActiveWorkbook.Worksheets
Worksheet.Unprotect Password:=unpass
Next
Exit Sub
booboo: MsgBox "There is s problem - check your password, capslock, etc."
End Sub

IV. 3. Then press F5 key to run the code, and enter the password that you have applied for
the protected sheets. (the protected sheets must have the same password)See
screenshot:

V.
VI. 4. Click OK, and the protected sheets have been unprotected at once.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy