Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I use the following code to protect/unprotect all sheets in a excel file:
Private Sub CommandButton1_Click() Dim wSheet As Worksheet For Each wSheet In Worksheets If wSheet.ProtectContents = True Then wSheet.Unprotect Password:=TextBox1.Text Else wSheet.Protect Password:=TextBox1.Text End If Next wSheet Unload Me End Sub It works well, but I would like that when I protect the sheets it will ask twice for the password. Like excel ask normally when you protect sheet for sheet.(tools, protection, protect sheet) Who knows the code for this. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Protect/unprotect all sheets at once? | New Users to Excel | |||
Protect-Unprotect all the sheets | Excel Worksheet Functions | |||
Macros for Protect/Unprotect all sheets in a workbook | Excel Programming | |||
Protect / Unprotect Sheets | Excel Programming | |||
Protect/Unprotect Sheets | Excel Programming |