I'm desperately in need of some VB help with a macro i created to pull in several reports...I would like to copy the data from one worksheet to another in the same workbook. However, the number of rows for every worksheet will be different everytime. I would like to have code in the macro to select the range automatically rather than putting a range (A2:E2500).
Below is the code that gives me a runtime error 1004. Any help would be much appreciated...
Sheets("Admin Expense Report 2007").Select
Range("B2").Select
x = Range("A65536").End(x1Up).Row
ActiveSheet.Range(Cells(2, 1), Cells(x, 10)).Select
Selection.Copy
Sheets("Admin Expense Report 2006").Select
Dim LastRow As Long
With ActiveSheet
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
ActiveSheet.Paste
End With
Columns("J:J").EntireColumn.AutoFit
ActiveWindow.LargeScroll ToRight:=-1
j.
Bookmarks