Sub Sample3()
Dim objWbk As Workbook ‘ Book1
Dim objSh1 As Worksheet ‘ Sheet1
Dim objSh2 As Worksheet ‘ Sheet1
Dim LastRow As Long
Dim path As String
Dim file As String
Dim objWbk2 As Workbook ‘ Book1
Dim objSh12 As Worksheet ‘ Sheet1

Set objWbk = ThisWorkbook
Set objSh1 = objWbk.Worksheets(“Sheet3”)
Set objSh2 = objWbk.Worksheets(“Sheet1”)

path = objSh1.Range(“C2”)
file = objSh1.Range(“C3”)

FileCopy path + file, “C:\Users\laughmaker\Desktop\マクロ\コピーマクロ\” + file
Workbooks.Open “C:\Users\laughmaker\Desktop\マクロ\コピーマクロ\” + file

Set objWbk2 = Workbooks(file)
Set objSh12 = objWbk2.Worksheets(“1”)

LastRow = objSh12.Cells(Rows.Count, 2).End(xlUp).Row
MsgBox “最終行は” & LastRow & “です”
objSh12.Rows(LastRow).Copy

objSh2.Rows(3).PasteSpecial
Application.CutCopyMode = False ‘ コピーモードを解除
End Sub