Good morning/afternoon/evening
I would like to ask you kind people for a little more help. I have created a userform to password protect/unprotect all worksheets at once with help from this forum. What i would like is to activate the check box so that if i would like to allow cell formatting i can. See image below. Another thing if possible, is when i input the password, is there a way a popup can appear to confirm password. This is what i have so far....
Your help or suggestions would be appreciated greatly![]()
Private Sub CheckBox4_Click() End Sub Private Sub cmdCancel_Click() Unload Me End Sub Private Sub cmdProtect_Click() Dim wSheet As Worksheet On Error Resume Next For Each wSheet In Worksheets If wSheet.ProtectContents = True Then wSheet.Unprotect Password:=txtPwd.Text Else wSheet.Protect Password:=txtPwd.Text, _ AllowFormattingCells:=CheckBox4.Enabled End If Next wSheet If Err <> 0 Then MsgBox "You have entered an incorrect password. All worksheets could not " & _ "be unprotected.", vbCritical, "Incorrect Password" End If On Error GoTo 0 Unload Me End Sub Private Sub Label5_Click() End Sub Private Sub txtPwd_Change() End Sub Private Sub UserForm_Click() End Sub
![]()
Bookmarks