1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| Private Sub CBUser_Click()
Dim ws As Variant
If TBPW.Value = PW Then
For Each ws In ThisWorkbook.Sheets
If ws.CodeName <> "sh_11xx" Or ws.CodeName <> "sh_12xx" Or ws.CodeName <> "sh_ab" Or ws.CodeName <> "sh_amif" _
Or ws.CodeName <> "sh_amif" Or ws.CodeName <> "sh_dthw" Or ws.CodeName <> "sh_modif" Or ws.CodeName <> "sh_bdtablien" _
Or ws.CodeName <> "sh_tablien" Or ws.CodeName <> "sh_cpk" Or ws.CodeName <> "grph_evomens" Then
ws.Visible = False
End If
Next ws
ThisWorkbook.Protect Password:=PW, Structure:=True, Windows:=False
Unload frm_Admin
Else
With TBPW
.PasswordChar = ""
.Value = "Insert Password..."
End With
End If
End Sub |
Partager