un internaute
XLDnaute Impliqué
Bonjour le forum,
J'ai ce code ci-dessous, comment pourrais-je afficher masquer en un clic sur cellule pour éviter bouton?
Merci pour vos éventuels retours
Cordialement
J'ai ce code ci-dessous, comment pourrais-je afficher masquer en un clic sur cellule pour éviter bouton?
Merci pour vos éventuels retours
Cordialement
VB:
Option Explicit
Sub AfficherMasquerOnglets(Optional Affiche As Integer)
Dim Ws As Worksheet, Feuille As Worksheet, I As Integer
Dim LesFeuilles
Application.ScreenUpdating = False
Set Ws = ActiveSheet
If Affiche = 0 Then
Affiche = xlSheetVeryHidden
For I = 1 To Sheets.Count
If Sheets(I).Visible = xlSheetVeryHidden Then Affiche = True: Exit For
Next I
End If
For Each Feuille In Sheets
Select Case Feuille.Name
Case "TOTO - TATA"
Case Else
With Feuille
.Unprotect
.Visible = Affiche
.Protect
End With
End Select
Next Feuille
End Sub