Code:
Sub CopyData()
Dim lrow As Long
lrow = Sheet7.Cells(Rows.Count, 1).End(xlUp).Row
Sheet7.Range("A2:B" & lrow & "").SpecialCells(xlCellTypeVisible).Copy _
Destination:=Sheet3.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)
End Sub
I am using this to copy the filtered data to another sheet
At this time lrow =350
Workbook starts out at 440kb, after running the code 5 times workbook is 1,050kb, sounds a little high but may be ok just added 1,750 rows of data.
I delete the data that was added in sheet3 columns A:B file size is now 964kb, thought it would be around 440 again.
I ran the code 5 more times and deleted all the data that was put in, file size now is 1,488kb
The more I run the code the bigger the file gets.
Checked where Excel thinks the last row in sheet3 is an it is H1, that is where it should be.
I deleted the sheet, sheet3, added another sheet to take its place and the file size is now back to 440kb.
Any ideas on why and how I can keep this from happening?
Excel 2003
Thanks Paul