ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   In VB, get Auto Filter Range (https://www.excelbanter.com/excel-programming/283473-vbulletin-get-auto-filter-range.html)

Michael Kintner

In VB, get Auto Filter Range
 
How can I in Excel VB get the Auto Filter Range from a sheet?

Next how can I can the Auto Filter Range of a specific column?

Finally how can I set for filter range in VB then return the found items and
values?

Sorry so many questions but the boos wants something done yesterday. You
know how that goes. (smile)

Thanks in advance for any help?

Mike



Tom Ogilvy

In VB, get Auto Filter Range
 
Dim rng1 as range, rng as Range, rng2 as Range
set rng = ActiveSheet.Autofilter.Range

set rng1 = rng.columns(3).Cells

set rng2 =
rng1.offset(1,0).Resize(rng1.rows.count-1).Specialcells(xlvisible)

--
Regards,
Tom Ogilvy

"Michael Kintner" wrote in message
...
How can I in Excel VB get the Auto Filter Range from a sheet?

Next how can I can the Auto Filter Range of a specific column?

Finally how can I set for filter range in VB then return the found items

and
values?

Sorry so many questions but the boos wants something done yesterday. You
know how that goes. (smile)

Thanks in advance for any help?

Mike






All times are GMT +1. The time now is 10:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com