Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
When I use Auto Filter the drop down list is blank CAF Excel Discussion (Misc queries) 0 September 17th 08 09:43 PM
Drop Down list to run Auto filter on another sheet Mitch4 Excel Discussion (Misc queries) 2 July 23rd 07 03:40 PM
Auto list/filter Scott Marcus Excel Discussion (Misc queries) 0 October 31st 06 05:23 PM
re-produce/loate auto filter list Sin Excel Worksheet Functions 2 February 1st 06 10:13 PM
Auto Filter From List James Stephens Excel Programming 0 January 28th 04 08:31 PM


All times are GMT +1. The time now is 03:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"