Hi Guys, I'm trying the following code but it returns with "Invalid qualifier" for "LastRow.Cpy", any suggestions?
Private Sub Rect143_Click()
Dim LastRow As Long
Dim FirstRow As Long
Open "C:\temp\TESTGC.XLS" For Input As #1 'open 1st excel file
LastRow = ActiveSheet.UsedRange.Rows.Count 'capture the lastest row
LastRow.Copy 'copy the latset row
FirstRow = LastRow 'assign it other variable
Open "C:\temp\TESTGC1.XLS" For Input As #2 'open 2nd excel file
FirstRow.Paste 'paste it to first row in 2nd excel file
Close #1 'Close 1st file
Close #2 'Close 2nd file
End Sub
Best Regards
Private Sub Rect143_Click()
Dim LastRow As Long
Dim FirstRow As Long
Open "C:\temp\TESTGC.XLS" For Input As #1 'open 1st excel file
LastRow = ActiveSheet.UsedRange.Rows.Count 'capture the lastest row
LastRow.Copy 'copy the latset row
FirstRow = LastRow 'assign it other variable
Open "C:\temp\TESTGC1.XLS" For Input As #2 'open 2nd excel file
FirstRow.Paste 'paste it to first row in 2nd excel file
Close #1 'Close 1st file
Close #2 'Close 2nd file
End Sub
Best Regards