Hi I have am using an auto filter and looping through the visible cells that remain. I get an error when there is no data visible based on the filtered criteria. I have the following code...
With Sheets("DB")
Set TableRange = .Range(.Cells(Origin.Row + 3, Origin.Column + x), .Cells(End.Row - 1, Origin.Column + x))
End With
For Each First In TableRange.SpecialCells(xlCellTypeVisible)
is there a way to check if TableRange.SpecialCells(xlCellTypeVisible)
is null. Basically I want to skip the For statement if there are no visible cells after the data is filtered. Thanks a lot.
With Sheets("DB")
Set TableRange = .Range(.Cells(Origin.Row + 3, Origin.Column + x), .Cells(End.Row - 1, Origin.Column + x))
End With
For Each First In TableRange.SpecialCells(xlCellTypeVisible)
is there a way to check if TableRange.SpecialCells(xlCellTypeVisible)
is null. Basically I want to skip the For statement if there are no visible cells after the data is filtered. Thanks a lot.