lundi 6 avril 2015

VBA: If there exist non-blank cells in Range(X), continue with code. Else, go to end

I'm trying to put a Try-Catch type line of code into my program in VBA. What I've got is below. However, this code just runs to the End If right away, regardless of whether or not there is data in the cells of column A. What can I do to fix this?

Thank you.



ActiveSheet.ListObjects("Table1").Range.AutoFilter Field:=11, Criteria1:= _
"0"
If Range("A:A").SpecialCells(xlCellTypeVisible).Text = "<>0" _
Then
(other code)
(other code)
(other code)
End If

Aucun commentaire:

Enregistrer un commentaire