D
Dennis
The below snippet worked for me when I wanted to transfer an AutoFilter.Range of
visible cells only to an Array.
The code is a bit crude but this is the only way I could get it to work after
many different trials. Is there a more efficient way?
Thanks
Dennis
======================================================================
dim myArr as variant
dim rng1 as range, FRng as range
dim LastCol as long, FRows as long
LastCol = .Sheets(1).Range("A1").End(xlToRight).Column
<snip AutoFilter code>
With Sheets(1).AutoFilter.Range
Set rng1 = .Columns(1).SpecialCells(xlCellTypeVisible)
FRows = rng1.Count
Set FRng = .SpecialCells(xlCellTypeVisible).Range("a1"). _
Resize(FRows, LastCol)
End With
myArr = FRng
visible cells only to an Array.
The code is a bit crude but this is the only way I could get it to work after
many different trials. Is there a more efficient way?
Thanks
Dennis
======================================================================
dim myArr as variant
dim rng1 as range, FRng as range
dim LastCol as long, FRows as long
LastCol = .Sheets(1).Range("A1").End(xlToRight).Column
<snip AutoFilter code>
With Sheets(1).AutoFilter.Range
Set rng1 = .Columns(1).SpecialCells(xlCellTypeVisible)
FRows = rng1.Count
Set FRng = .SpecialCells(xlCellTypeVisible).Range("a1"). _
Resize(FRows, LastCol)
End With
myArr = FRng