Coping Dates from workbook to workbook

K

Kenny

For some reason everything copys to the new work book except for the date
column "L" can someone help me please. I stoped the code and it will only
select the first date. But all other works why? how do I fix?


ActiveSheet.Range("A2").AutoFilter Field:=12, Criteria1:="<>"
Application.ScreenUpdating = False
Workbooks.Open Filename:= _
"C:\Users\Kenny\Documents\Toyota\Floater\Daily Tracker Report.xls"
Windows("New Tracker.xls").Activate
Range("L6").End(xlDown).Copy <========================
Windows("Daily Tracker Report.xls").Activate
Worksheets("sheet1").Range("A5").PasteSpecial Paste:=xlPasteValues
Windows("New Tracker.xls").Activate
Range("A6:B6").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Windows("Daily Tracker Report.xls").Activate
Worksheets("sheet1").Range("B5").PasteSpecial Paste:=xlPasteValues
Windows("New Tracker.xls").Activate
Range("G6:K6").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Windows("Daily Tracker Report.xls").Activate
Worksheets("sheet1").Range("D5").PasteSpecial Paste:=xlPasteValues
Windows("New Tracker.xls").Activate
Range("A6").Select
'Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
'Selection.EntireRow.Delete
'Windows("Daily Tracker Report.xls").Activate
ActiveSheet.Range("A2").AutoFilter Field:=12
 
G

Gord Dibben

Maybe you have a blank cell in L7.

xldown will stop at first blank cell it gets to.

Range(("L6"), Cells(Rows.Count, ActiveCell.Column).End(xlUp)).Copy

may work better.


Gord Dibben MS Excel MVP
 
K

Kenny

thanks man you rock!

Gord Dibben said:
Maybe you have a blank cell in L7.

xldown will stop at first blank cell it gets to.

Range(("L6"), Cells(Rows.Count, ActiveCell.Column).End(xlUp)).Copy

may work better.


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top