FILtRE_VIDE

salut

comment afficher une msgbox contenu "le tab est vide"

si le tab est vide apres le filtre c t dire par ex range E1=9

6ex-filtre.xlsm (20.11 Ko)

Bonsoir,

        With .ListObjects("Tableau1").Range
            .AutoFilter 1, crf
           If .SpecialCells(xlCellTypeVisible).Rows.Count = 1 Then _
             MsgBox ("Le tab est vide")
        End With

Cordialement.

Merci

Comment avez-vous appris la programmation

vous êtes formidables

salut

quand j'ai mis 5 dans cell E5 le msgbox apparait

Vu ! Un effet pervers d'Excel qui ne compte les ligne que sur la première aire... On va tourner autrement :

        With .ListObjects("Tableau1").Range
            .AutoFilter 1, crf
            With .SpecialCells(xlCellTypeVisible)
                If .Rows.Count = 1 And .Areas.Count = 1 Then MsgBox "Le Tab est vide"
            End With
        End With

Cordialement.

MeRcI MFERRAND infiniment C JOLI

Rechercher des sujets similaires à "filtre vide"