I have been looking around trying to find a code to copy data from nonajadcent cells into another workbook. I finally found this code and modified it to fit my needs.
I keep getting a run-time error '9' Subscipt out of range.
Could someone tell me what my problem is without me uploading the workbooks?
Once I get the first line to work as needed, I have about twenty cells to copy/paste which I can do.
Thanks in advance
Sub CopySpecial()
Const SourceSheet = "Form"
Const TargetSheet = "Logbook"
Const ExternalWorkbook = "2010 Logbook.xls"
Sheets(SourceSheet).Range(Call_Number).Copy Destination:=Workbooks(ExternalWorkbook).Sheets(TargetSheet).Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)
'Sheets(SourceSheet).Range("$C$12").Copy Destination:=Workbooks(ExternalWorkbook).Sheets(TargetSheet).Cells(Rows.Count, 1).End(xlUp).Offset(0, 2)
'Sheets(SourceSheet).Range("$E$18").Copy Destination:=Workbooks(ExternalWorkbook).Sheets(TargetSheet).Cells(Rows.Count, 1).End(xlUp).Offset(0, 3)
'Sheets(SourceSheet).Range("$G$59").Copy Destination:=Workbooks(ExternalWorkbook).Sheets(TargetSheet).Cells(Rows.Count, 1).End(xlUp).Offset(0, 4)
End Sub
Bookmarks