LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 202
Default change filter with criteria back to All

I'm looping through workbooks that have filtered data. I'm using
GetObject(workbook name) because I don't want to use any select or activate
methods. I have two criteria set in each workbook. I want to turn off the
criteria on the Include/Exclude field. I'm having trouble changing this
field back to all. So I turned off the autofilter and turned it back on with
the same criteria in the Primary PMO field. However, I'm not getting it to
work.

With FS
.NewSearch
.LookIn = strDir
intCnt = .Execute
For Each varFN In .FoundFiles
Set wkbPMO = GetObject(varFN)
Set wks = wkbPMO.Sheets("Scoring Sheet")
With wks.Rows(1)
Set rFind = .Find("Include / Exclude")
intIncldCol = rFind.Column
Set rFind = .Find("Primary PMO")
intPMOCol = rFind.Column
End With
'========================================
'get value for PMO. turn off autofilter,
'then turn back on and reset the criteria
'for Primary PMO
'========================================
With wks
Set flt = .AutoFilter.Filters(intPMOCol)
strPMO = flt.Criteria1
.AutoFilterMode = False
.Range("A2").AutoFilter field:=intPMOCol, Criteria1:=strPMO
End With
wkbPMO.Close
Set wkbPMO = Nothing
Next
End With
 
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
How to change back to English [email protected] Excel Discussion (Misc queries) 0 August 26th 08 02:51 AM
How do you change Cell name reference from R[-2]C[-1] back to C2 rhind3833 Excel Discussion (Misc queries) 2 June 2nd 07 05:11 PM
Use date modified to change format & create filter to track change PAR Excel Worksheet Functions 0 November 15th 06 09:17 PM
pulling back dates that meet certain criteria Bruno Excel Worksheet Functions 1 July 21st 06 02:40 PM
"Criteria Range" in the "Data/Filter/Advanced Filter" to select Du TC Excel Worksheet Functions 1 May 12th 05 02:06 AM


All times are GMT +1. The time now is 02:14 AM.

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"