Greetings,
I have been trying to find a macro that can copy a range of data (A2:Q2) from a worksheet and paste it to the next available row (A:Q) of a worksheet in a different workbook. I am trying to get the 2nd workbook to be a running log of entries pulled from the 1st workbook. Anyway, I have had no luck trying to rework some of the macros I have seen due to various types of errors I have be unable to debug.
The code I am curently messing with acts like it is trying, but the desired data set doesn't make it to the 2nd workbook. I was hoping one of you all could give it a look and steer me down the right path. I know nothing of VBA and I have been looking for cookie-cutter solutions for my task.
Sub Copytolog()
Dim source As Range, dest As Range
Workbooks.Open FileName:="C:\Users\patrick\desktop\vandy stuff\working files\monthly log sheet.xlsx"
Set source = Workbooks("Tech form 4.0.xlsm").Worksheets("Pull sheet").Range("A2:Q2").End(xlUp)
Set dest = Workbooks("Monthly Log Sheet.xlsx").Worksheets("Sheet 1").Range("A2:Q2").End(xlUp)
source.Copy
dest.PasteSpecial
ActiveWorkbook.Close True
End Sub
Thank you for your time and assistance.
Patrick
Bookmarks