hi,
i have the next macro to copy some filtered files and i works fine
Sub copytoPSP()
Dim Lastrow As Long, Nextrow As Long
Application.ScreenUpdating = False
With Sheets("Classes")
Lastrow = .Range("A" & Rows.Count).End(xlUp).Row
Nextrow = Sheets("CPLEXPSP").Range("A" & Rows.Count).End(xlUp).Row + 1
If Nextrow < 8 Then Nextrow = 8
.Range("A8:A" & Lastrow).AutoFilter , Field:=1, Criteria1:=Range("A5").Value
.Range("A9:N" & Lastrow).Copy
Sheets("CPLEXPSP").Range("A" & Nextrow).PasteSpecial xlPasteValues
.AutoFilterMode = False
End With
Application.ScreenUpdating = True
End Sub
but when i add at the end to save automatically
...
Application.ScreenUpdating = True
ActiveWorkbook.save
End Sub
[/CODE]
the next time the macro runs it copies all the cells in the range and without filtering...
any help??
Thanks
jaun
Bookmarks