Another improvement is needed..It is just the syntax for specifying a named argument. Destination= will give an error.
Another example:
Rich (BB code):Workbooks.Open Filename:=ThisWorkbook.Path & "\" & "Book2.xls"
it works but it is copying entire data..If you want to copy everything try
Code:Workbooks("Book2.xls").Sheets("Sheet1").UsedRange.Copy _ Destination:=Workbooks("Book1.xls").Sheets("Sheet1").Range("A1")
What if E is also not fixed????I mean if it is nth column rather than 5th column??Try
Code:Dim LR As Long With Workbooks("Book2.xls").Sheets("Sheet1") LR = .Range("B" & Rows.Count).End(xlUp).Row .Range("B3:E" & LR).Copy _ Destination:=Workbooks("Book1.xls").Sheets("Sheet1").Range("A1") End With
Dim LR As Long, LC As Integer
With Workbooks("Book2.xls").Sheets("Sheet1")
LR = .Cells(Rows.Count, "B").End(xlUp).Row
LC = .Cells(3, Columns.Count).End(xlToLeft).Column
.Range(.Cells(3, 2), .Cells(LR, LC)).Copy _
Destination:=Workbooks("Book1.xls").Sheets("Sheet1").Range("A1")
End With