You could look at the last visible area and then look at the last cell in that
area:
Option Explicit
Sub testme()
Dim myRng As Range
Dim myRow As Long
With Worksheets("sheet1")
With .AutoFilter.Range.Columns(1).Cells.SpecialCells(xlCellTypeVisible)
With .Areas(.Areas.Count)
myRow = .Cells(.Cells.Count).Row
End With
MsgBox myRow
'maybe a check
If myRow = .Row Then
MsgBox "only headers are visible"
End If
End With
End With
End Sub
Ixtreme wrote:
>
> Hi,
>
> How can I quickly determine the last row on my sheet while autofilter
> is still active?
--
Dave Peterson
|