S
SteveDB1
morning all.
I have a macro that I obtained from Tom Hutchings last year, and it just
recently began selecting the text filter, instead of the drop down list
normally selected.
My question is twofold---
1- Why? So I can stop it from continuing to happen.
2-How can I get it to just select the items I specify? (what it was doing
before)
Code as follows.
Sub Filter()
Dim wks As Worksheet
mv = range("f3").End(xlDown).value
'this sets the criteria for the ChgAppl#.
mv1 = range("a3").End(xlDown).value
'this is my add-on to set a second criteria filter- Name of owner.
For Each wks In ActiveWorkbook.Worksheets
Select Case wks.Name
Case "Sum", "Summary", "SUM", "summary", "SUM ", "Sum ", "Summary ",
"SUMMARY", "SUMMARY ", "SUM189", " SUM189", "SUM189 "
With wks
Sheets(wks.Name).range("A8:F8").AutoFilter field:=1, Criteria1:=mv
'this takes in to acct the chg appl# for a filter.
Sheets(wks.Name).range("A8:F8").AutoFilter field:=3, Criteria1:=mv1
'this takes in to account the owner name for a filter.
End With
End Select
Next wks
End Sub
Thank you.
I have a macro that I obtained from Tom Hutchings last year, and it just
recently began selecting the text filter, instead of the drop down list
normally selected.
My question is twofold---
1- Why? So I can stop it from continuing to happen.
2-How can I get it to just select the items I specify? (what it was doing
before)
Code as follows.
Sub Filter()
Dim wks As Worksheet
mv = range("f3").End(xlDown).value
'this sets the criteria for the ChgAppl#.
mv1 = range("a3").End(xlDown).value
'this is my add-on to set a second criteria filter- Name of owner.
For Each wks In ActiveWorkbook.Worksheets
Select Case wks.Name
Case "Sum", "Summary", "SUM", "summary", "SUM ", "Sum ", "Summary ",
"SUMMARY", "SUMMARY ", "SUM189", " SUM189", "SUM189 "
With wks
Sheets(wks.Name).range("A8:F8").AutoFilter field:=1, Criteria1:=mv
'this takes in to acct the chg appl# for a filter.
Sheets(wks.Name).range("A8:F8").AutoFilter field:=3, Criteria1:=mv1
'this takes in to account the owner name for a filter.
End With
End Select
Next wks
End Sub
Thank you.