Private Sub CB_1_Click()
Dim i As Integer, MesSht As String, TSht() As String
' Tableau des feuilles à AFFICHER/CACHER séparée par des virgule
MesSht = "feuil1, Feuile2"
TSht = Split(MesSht, ",")
'
If CB_1.Caption = "TOI" Then
' Demander le mot de passe
USF_Mdp.TextBox1.Value = ""
USF_Mdp.Show
If FlgOk = False Then
MsgBox "Mot de passe érroné !"
Exit Sub
End If
' Si OK, masquer les feuilles
For i = 0 To UBound(TSht)
Sheets(TSht(i)).Visible = xlSheetVisible
Next i
'unproteger les feuilles
UnProtect_Feuille
CB_1.Caption = "QUITER moi"
CB_1.BackColor = 255
Else
For i = 0 To UBound(TSht)
Sheets(TSht(i)).Visible = xlSheetVeryHidden
' proteger les feuilles
Protect_Feuille
Next i
CB_1.Caption = "moi"
CB_1.BackColor = 32768
End If
End Sub