S
sramam
Hi,
I am attempting to apply an autofilter in a loop (to
compute subtotals). I have a single cell selected
Set ws = WorkSheet(1)
ws.Range("A1").Select
Selection.AutoFilter Field:=1, Criteria1:=FieldVal
FieldVal changes with every iteration of the loop.
I am attempting to get the special cells with
Set FilterData = ws.Range("A1")
MsgBox( FilterData.CurrentRegion.SpecialCells _
(xlVisible).Areas.Count)
The last statement gives me a value of >1 sometimes for
the second iteration and higher of my loop.
Unsure what I am doing wrong here.
Any help is much appreicated.
thanks,
-shishir
I am attempting to apply an autofilter in a loop (to
compute subtotals). I have a single cell selected
Set ws = WorkSheet(1)
ws.Range("A1").Select
Selection.AutoFilter Field:=1, Criteria1:=FieldVal
FieldVal changes with every iteration of the loop.
I am attempting to get the special cells with
Set FilterData = ws.Range("A1")
MsgBox( FilterData.CurrentRegion.SpecialCells _
(xlVisible).Areas.Count)
The last statement gives me a value of >1 sometimes for
the second iteration and higher of my loop.
Unsure what I am doing wrong here.
Any help is much appreicated.
thanks,
-shishir