B
Brad
I have some code that operates in a loop that should filter a table for a
particular value, copy the visible cells and then paste them at the bottom of
the table. The filtering and copying works, but having trouble with pasting
to the bottom of the table. Here is the code snipet, any help would be
greatly appreciated.
With
Workbooks("Tables").Sheets("Top8").ListObjects("tblTop8Issue")
.Range.AutoFilter Field:=7
.Range.AutoFilter Field:=1
.Range.AutoFilter Field:=7, Criteria1:=(iCW - 1)
.Range.AutoFilter Field:=1, Criteria1:=iLoop
.DataBodyRange.SpecialCells(xlCellTypeVisible).Copy
.Range.AutoFilter Field:=1
.Range.AutoFilter Field:=7
Error -> .Range("tblTop8Issue[[#Headers],[Issue_Num]]").End(xlDown).Select
here ActiveCell.Offset(1, 0).Select
ActiveSheet.Paste
ActiveCell.Offset(0, 1).Value = Top8CpaEntryForm.txtWeek
End With
particular value, copy the visible cells and then paste them at the bottom of
the table. The filtering and copying works, but having trouble with pasting
to the bottom of the table. Here is the code snipet, any help would be
greatly appreciated.
With
Workbooks("Tables").Sheets("Top8").ListObjects("tblTop8Issue")
.Range.AutoFilter Field:=7
.Range.AutoFilter Field:=1
.Range.AutoFilter Field:=7, Criteria1:=(iCW - 1)
.Range.AutoFilter Field:=1, Criteria1:=iLoop
.DataBodyRange.SpecialCells(xlCellTypeVisible).Copy
.Range.AutoFilter Field:=1
.Range.AutoFilter Field:=7
Error -> .Range("tblTop8Issue[[#Headers],[Issue_Num]]").End(xlDown).Select
here ActiveCell.Offset(1, 0).Select
ActiveSheet.Paste
ActiveCell.Offset(0, 1).Value = Top8CpaEntryForm.txtWeek
End With