Code ne fonctionne pas

Résolu
Bonjour,
Ces codes ne fonctionnent pas et je comprends pas :

Private Sub Worksheet_Activate()
If Sheet("FR")("AB2") <> "T" Then Btn_Traité.Visible = False
If Sheet("FR")("AB2") = "T" Then Btn_Traité.Visible = True
End Sub

Merci de m'éclairer.

Configuration: Windows / Firefox 64.0

4 réponses

  1. Bonjour

    Private Sub Worksheet_Activate() 
    If Sheet("FR").Range("AB2") <> "T" Then Btn_Traité.Visible = False 
    If Sheet("FR").Range("AB2") = "T" Then Btn_Traité.Visible = True 
    End Sub 
    0
    1. Bonjour M-12
      Je te remercie pour ta réponse, seulement, ne fonctionne toujours pas chez moi.
      0
      1. Re,
        Place un classeur modèle
        Tu vas dans https://www.cjoint.com/
        Tu cliques sur "PARCOURIR" pour sélectionner ton fichier
        Clic le bouton "CREER LE LIEN"
        Clic droit quand le lien est créé "COPIER LE LIEN"
        Sur ton message Clic droit "Coller".
        0
      2. Re,
        Private Sub Worksheet_Activate() 
        If Sheets("FR").Range("AB2") <> "T" Then Btn_Traité.Visible = False 
        If Sheets("FR").Range("AB2") = "T" Then Btn_Traité.Visible = True 
        End Sub 


        https://mon-partage.fr/f/KWOG3174/
        0
    2. Voici, en vous remerciant
      https://www.cjoint.com/c/IBckklNbmk6
      0
      1. Re,

        modifie ici en mettant un s à Sheet (Sheets)
        Private Sub Btn_ValiderSaisie_Click()
        Dim chDos$, Dos$, Fich$
        
            If Sheets("FR").Range("AB2") <> "T" Then Btn_Traité.Visible = False        '????????????????
            If Sheets("FR").Range("AB2") = "T" Then Btn_Traité.Visible = True          '????????????????
        0
    3. Bonjour M-12
      Merci beaucoup, il est temps que je me réveille.
      Bon dimanche.
      0