Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto-filter. Cursor on first row in new list
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto-filter. Cursor on first row in new list
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto-filter. Cursor on first row in new list
I combined your suggestion with this:
http://www.excelforum.com/archive/in.../t-503428.html And it works fine. Thank you. "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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
When I use Auto Filter the drop down list is blank | Excel Discussion (Misc queries) | |||
Drop Down list to run Auto filter on another sheet | Excel Discussion (Misc queries) | |||
Auto list/filter | Excel Discussion (Misc queries) | |||
re-produce/loate auto filter list | Excel Worksheet Functions | |||
Auto Filter From List | Excel Programming |