R
Rich
I am using Excel 97.
I want to accomplish the following. I want to set a filter then copy
the filtered data to the next available empty cell in the new report.
The code looks something like this.
Dim rngSource As Range, rngDestination As Range
Cells.Select
Selection.AutoFilter
Selection.AutoFilter Field:=41, Criteria1:="FB"
Set rngSource = ActiveWorkbook.Cells.SpecialCells(xlCellTypeVisible).Copy
<- Crashes here on specialcells.
wbNew.Activate
Set rngDestination = ActiveWorkbook.Range(lcCell)
rngSource.Copy rngDestination
The help file says that specialcells returns a range. But I can not
seem to assign the filtered data to a range.
How can I do the above?
I want to accomplish the following. I want to set a filter then copy
the filtered data to the next available empty cell in the new report.
The code looks something like this.
Dim rngSource As Range, rngDestination As Range
Cells.Select
Selection.AutoFilter
Selection.AutoFilter Field:=41, Criteria1:="FB"
Set rngSource = ActiveWorkbook.Cells.SpecialCells(xlCellTypeVisible).Copy
<- Crashes here on specialcells.
wbNew.Activate
Set rngDestination = ActiveWorkbook.Range(lcCell)
rngSource.Copy rngDestination
The help file says that specialcells returns a range. But I can not
seem to assign the filtered data to a range.
How can I do the above?