Run time error '91

J

Jim May

In a standard module I have:
Any help appreciated.

Public Sub CopyFilter()
Dim rng1 As Range
Dim rng2 As Range
Sheets("POReqs").Select
With ActiveSheet.AutoFilter.Range <<< R/T Error Here _Why???
On Error Resume Next
Set rng2 = .Offset(1, 0).Resize(.Rows.Count - 1, 1)
.SpecialCells (xlCellTypeVisible)
On Error GoTo 0
End With
..... more code follows...
 
T

Tom Ogilvy

You would get that error if you don't have an autofilter on the worksheet.

With the autofilter dropdowns showing, no problem

? activesheet.autofilter.Range.address
$C$5:$C$17
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top