Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 100
Default Refresh Autofilter

I'm very new to marcos, so please be gentle....

I have a worksheet named Summary which uses Auto Filter (Non-Blanks). It's
important that none of the formulas get messed up on this page, so I've
protected it. Depending on data entered on other worksheets, rows on the
Summary sheet may or may not be blank. I would like Summary to re-do the auto
filter and remain protected everytime the workbook re-calculates. I tried
recording a marco and here's what I've got so far. All help is appreciated.
It says Active sheet, but Summary will hardly ever be the sheet I'm looking
at when the workbook calculates. I only need it to affect the worksheet
Summary.

Thanks,

Sub RefreshAutoFilter()
'
' RefreshAutoFilter Macro
' Macro recorded 10/9/2006 by sb1920alk
'

'
ActiveSheet.Unprotect
Selection.AutoFilter Field:=1, Criteria1:="<"
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Refresh Autofilter


'
' RefreshAutoFilter Macro
' Macro recorded 10/9/2006 by sb1920alk
'

'
ActiveSheet.Unprotect
Selection.AutoFilter Field:=1, Criteria1:="<"
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub


looks like you are on the right track. store your code in a proc
called Workbook_SheetCalculate. doing that will trigger exectuion
every time there is a calculation

HTH

AR

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 100
Default Refresh Autofilter

Not quite sure what you mean

"ducky" wrote:


'
' RefreshAutoFilter Macro
' Macro recorded 10/9/2006 by sb1920alk
'

'
ActiveSheet.Unprotect
Selection.AutoFilter Field:=1, Criteria1:="<"
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub


looks like you are on the right track. store your code in a proc
called Workbook_SheetCalculate. doing that will trigger exectuion
every time there is a calculation

HTH

AR


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 100
Default Refresh Autofilter

I've been messing with this and haven't been getting anywhere. I tried
running it from another worksheet, but it did the Auto Filter on that sheet
instead of the Summary sheet. I altered the code like this, but it didn't
help.

Sub RefreshAutoFilter()
'
' RefreshAutoFilter Macro
' Macro recorded 10/9/2006 by sb1920alk
'

'
Worksheets("Summary").Unprotect
Selection.AutoFilter Field:=1, Criteria1:="<"
Worksheets("Summary").Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True
End Sub



"sb1920alk" wrote:

Not quite sure what you mean

"ducky" wrote:


'
' RefreshAutoFilter Macro
' Macro recorded 10/9/2006 by sb1920alk
'

'
ActiveSheet.Unprotect
Selection.AutoFilter Field:=1, Criteria1:="<"
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub


looks like you are on the right track. store your code in a proc
called Workbook_SheetCalculate. doing that will trigger exectuion
every time there is a calculation

HTH

AR


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Refresh Autofilter

http://www.cpearson.com/excel/events.htm

for an overview of events. (Chip Pearson's site)

--
Regards,
Tom Ogilvy


"sb1920alk" wrote in message
...
Not quite sure what you mean

"ducky" wrote:


'
' RefreshAutoFilter Macro
' Macro recorded 10/9/2006 by sb1920alk
'

'
ActiveSheet.Unprotect
Selection.AutoFilter Field:=1, Criteria1:="<"
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True
End Sub


looks like you are on the right track. store your code in a proc
called Workbook_SheetCalculate. doing that will trigger exectuion
every time there is a calculation

HTH

AR




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
Create refresh button in worksheet to refresh Pivot Table Data Ron Excel Worksheet Functions 1 October 13th 07 01:20 AM
Refresh Autofilter BKO Excel Worksheet Functions 1 June 18th 07 03:22 PM
Timing of automatic query refresh and macro pivot table refresh dutty Excel Programming 2 December 1st 04 07:19 PM
Pivot Table REFRESH Flaw -- Saves Old Data in Selection Area AFTER REFRESH Ken Roberts Excel Programming 3 September 11th 03 06:02 AM
Excel does not close from VB!! (when i refresh Refresh query with BackgroundQuery:=False) Anant[_2_] Excel Programming 1 August 6th 03 04:22 AM


All times are GMT +1. The time now is 03:14 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"