Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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(xlCellTypeVisibl e).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? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Insert Row/Copy with Autofilter | Excel Discussion (Misc queries) | |||
Autofilter - copy & paste | Excel Worksheet Functions | |||
Copy/Paste in Autofilter | Excel Discussion (Misc queries) | |||
Copy error with Autofilter | Excel Programming | |||
Copy an autofilter range | Excel Programming |