Hi,
Currently I am filtering for some errors in my sheet using the following code:
[vba]Application.ScreenUpdating = False
With Cells
.Columns("A:L").AutoFilter Field:=1, Criteria1:="0"
.Rows("2:" & .Rows.Count).SpecialCells(xlCellTypeVisible).EntireRow.Copy
.Columns("A:L").AutoFilter Field:=1, Criteria1:="<>"
End With
Application.ScreenUpdating = True
[/vba]
So currently I just delete all the rows selected.
I would like to however add a new Sheet called "Errors" and copy the data prior deletion into this new sheet:
[vba] .Rows("2:" & .Rows.Count).SpecialCells(xlCellTypeVisible).EntireRow.Copy
.Rows("2:" & .Rows.Count).SpecialCells(xlCellTypeVisible).EntireRow.Copy[/vba]
The problem is I don't seem to figure out how to do this, without making "Error" sheet an Active one... Basically I want this copying to happen in the background as I need to have my current sheet Active for other purposes...
Thanks a lot
Mike