Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
And, finally, a tested version...
Sub filterSHEETS(ReturnArray() As String, iField As Integer, _ RangeToFilter As String) Dim astrItems() As String '//what purpose does this serve? Dim wks As Worksheet Const sSheetNames As String = "Amenity,Benchmark,Rate,Volume," _ & "Negotiation Tool Report" For Each wks In ActiveWorkbook.Worksheets With wks If InStr(sSheetNames, .Name) 0 Then .Select With .Range(RangeToFilter) .AutoFilter .AutoFilter Field:=iField, _ Criteria1:=ReturnArray End With '.Range(RangeToFilter) End If ' InStr(sSheetNames, .Name) 0 End With 'wks Next wks End Sub -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error Msg - Object variable or With Blockvariable not set | Excel Programming | |||
Object Variable Not Set Error on Selection object | Excel Worksheet Functions | |||
Run-time error '91': "Object variable or With block variable not set | Excel Programming | |||
Cells.Find error Object variable or With block variable not set | Excel Programming | |||
Pivot Table - Object variable or with block variable not set? | Excel Programming |