Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default How to save current filter of Table(ListObject) and to apply it la

Hi , I am new in Excel Programming .I have following question:
I have an object
Excel.ListObject lo = _currentWS.ListObjects[1];
lo.AutoFilter contains current filter which user activated(for example,
top10, contains ,greater than ... ).

I need to perform
lo.AutoFilter.ShowAllData();
In this case user filter disappear.
What I need to do for saving current filter and applying it after.
Thanks a lot

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default How to save current filter of Table(ListObject) and to apply it la

Sub SetFiltRngToVar()
Rng = Sheets(1).UsedRange.SpecialCells(xlCellTypeVisible ).Address
MsgBox Rng
End Sub

"Smugliy" wrote:

Hi , I am new in Excel Programming .I have following question:
I have an object
Excel.ListObject lo = _currentWS.ListObjects[1];
lo.AutoFilter contains current filter which user activated(for example,
top10, contains ,greater than ... ).

I need to perform
lo.AutoFilter.ShowAllData();
In this case user filter disappear.
What I need to do for saving current filter and applying it after.
Thanks a lot

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default How to save current filter of Table(ListObject) and to apply i

Sorry,JLGWhiz
How this function helps me ?Its stores filter of table?
How can I apply it from Rng?

"JLGWhiz" wrote:

Sub SetFiltRngToVar()
Rng = Sheets(1).UsedRange.SpecialCells(xlCellTypeVisible ).Address
MsgBox Rng
End Sub

"Smugliy" wrote:

Hi , I am new in Excel Programming .I have following question:
I have an object
Excel.ListObject lo = _currentWS.ListObjects[1];
lo.AutoFilter contains current filter which user activated(for example,
top10, contains ,greater than ... ).

I need to perform
lo.AutoFilter.ShowAllData();
In this case user filter disappear.
What I need to do for saving current filter and applying it after.
Thanks a lot

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default How to save current filter of Table(ListObject) and to apply i

The variable Rng contains the string address of the filtered items, so you
would use it like the "&A$1" in Range("$A$1"), only without the quote marks.

ActiveSheet.Range(Rng).Copy Sheets(2).Range("A2")

would copy the filtered data to sheet 2, with the top left corner of the
range achored in cell A2.

"Smugliy" wrote:

Sorry,JLGWhiz
How this function helps me ?Its stores filter of table?
How can I apply it from Rng?

"JLGWhiz" wrote:

Sub SetFiltRngToVar()
Rng = Sheets(1).UsedRange.SpecialCells(xlCellTypeVisible ).Address
MsgBox Rng
End Sub

"Smugliy" wrote:

Hi , I am new in Excel Programming .I have following question:
I have an object
Excel.ListObject lo = _currentWS.ListObjects[1];
lo.AutoFilter contains current filter which user activated(for example,
top10, contains ,greater than ... ).

I need to perform
lo.AutoFilter.ShowAllData();
In this case user filter disappear.
What I need to do for saving current filter and applying it after.
Thanks a lot

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default How to save current filter of Table(ListObject) and to apply i

I think you didn't understand me correctly.

I want to apply the same filter on the Table .
It's mean user created some filter on table, I need to save this filter and
apply it later on the same table.
I don't want to copy range from one sheet to another

"JLGWhiz" wrote:

The variable Rng contains the string address of the filtered items, so you
would use it like the "&A$1" in Range("$A$1"), only without the quote marks.

ActiveSheet.Range(Rng).Copy Sheets(2).Range("A2")

would copy the filtered data to sheet 2, with the top left corner of the
range achored in cell A2.

"Smugliy" wrote:

Sorry,JLGWhiz
How this function helps me ?Its stores filter of table?
How can I apply it from Rng?

"JLGWhiz" wrote:

Sub SetFiltRngToVar()
Rng = Sheets(1).UsedRange.SpecialCells(xlCellTypeVisible ).Address
MsgBox Rng
End Sub

"Smugliy" wrote:

Hi , I am new in Excel Programming .I have following question:
I have an object
Excel.ListObject lo = _currentWS.ListObjects[1];
lo.AutoFilter contains current filter which user activated(for example,
top10, contains ,greater than ... ).

I need to perform
lo.AutoFilter.ShowAllData();
In this case user filter disappear.
What I need to do for saving current filter and applying it after.
Thanks a lot

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
Apply Filter to source of Pivot Table frankie.lau Excel Worksheet Functions 2 November 12th 09 01:17 AM
Help - Apply Formatting To Current Row [email protected] Excel Programming 6 August 5th 07 06:24 PM
Can I apply automatically the same filter on many pivot table ? mathieuvv Excel Programming 1 September 25th 06 04:07 PM
Can I apply automatically the same filter on many pivot table ? mathieuvv Excel Programming 0 September 25th 06 03:53 PM
Apply green to current date, red to 2 days overdue and none if pai vpschas Excel Worksheet Functions 16 September 7th 06 02:35 PM


All times are GMT +1. The time now is 03:06 PM.

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

About Us

"It's about Microsoft Excel"