View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
John[_129_] John[_129_] is offline
external usenet poster
 
Posts: 3
Default Auto-filter. Cursor on first row in new list

Thanks Tom. Where would I put this code to have it run when I use the
AutoFilter drop down list on the worksheet?

John

"Tom Ogilvy" wrote in message
...
Dim rng as Range, rng1 as range
set rng = Activesheet.Autofilter.Range.Columns(1).Cells
set rng = rng.offset(1,0).Resize(rng.rows.count - 1)
on error resume next
set rng1 = rng.SpecialCells(xlVisible)
On error goto 0
if not rng1 is Nothing then
rng1(1).Select
end if

--
Regards,
Tom Ogilvy


"John" wrote in message
...
Hi,

Is there any way to get the cursor to go to the first row of a filtered
list when Autofilter is used?

Thanks,

John