Count Visible Range?
If Worksheets("Sheet 1").UsedRange.Columns(1).SpecialCells(xlVisible).C ount =
1 Then
' no rows are visible
'More code here
End If
At least the header row should be visible.
If your headers are in the first row and you have no entirely blank rows in
your list
if
Activesheet.Range("A1").CurrentRegion.Columns(1).S pecialCells(xlVisible).count = 1 then
' no rows are visible
--
Regards,
Tom Ogilvy
"Matt" wrote:
I know there are lots of ways to do this procedure, but I was hoping
there might be something already defined.
I have a macro that filters out multiple rows based on certain
criteria. What I'd like to do is use a conditional statement to
determine if there are no remaining visible rows in the used range.
If Worksheets("Sheet 1").UsedRange.Rows.SpecialCells(xlVisible).Coun t =
0 Then
'More code here
End If
Worksheets("Sheet 1").UsedRange.Rows.SpecialCells(xlVisible).Coun t
evaluates, but not to the corrent value (when no rows in the used range
were visible it evalutated to 10560)
Seems to me like this should work, but its not.
Any help would be wonderful
|