Auto Reapply Filter Excel 2007

pyronaya

New Member
Joined
Apr 18, 2006
Messages
7
I have a spreadsheet that pulls information from our SQL server every time the excel file is opened. From there I have have 4 Worksheets with tables of information. These tables all have filters and sorts applied to them. With Excel 2007, I am able to click the "reapply" button, and it resorts my data....however, this has to be done on each worksheet.

Is there a simple way to do this automatically? Perhaps with some VB script?

I have tried to find a solution on the web for my problem here, and haven't gotten any success. I'm not very strong in VB, but I am capable.

Any help would be appreciated.

Cheers.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Can anyone shed some light on this? It should be something very straight forward in Excel. I doubt I'm the only person that would utilize this feature.

Thanks.
 
Upvote 0
LOL....looks like I discovered the solution to my own issue. I guess it's better to solve these problems on our own.

Nonetheless, if anyone encounters this problem in the future....below is the solution that worked for me. The Autofilter will reapply every time that worksheet is activated.


Private Sub Worksheet_activate()
'
' Reapply Autofilter Macro
'
ActiveSheet.AutoFilter.ApplyFilter
With ActiveWorkbook.Worksheets("Binders").AutoFilter.Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
 
Upvote 0
I was unable to get this to work. I am very interested in using this function, though. Any help? I have a spreadsheey with several rows that have conditional formatting. As I enter in a row and add information (its a trackers so it I add dates as the documents move along) the row colors change. I have a filter that I can "re-apply" which puts the documents in order by color, but I'd would like it to automatically re order the rows everytime I open it. Any help is appreciated!
 
Upvote 0

Forum statistics

Threads
1,214,424
Messages
6,119,401
Members
448,893
Latest member
AtariBaby

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top