Hi there,
I'm quite new to vb and I'm trying towrite a code to import data from another workbook.
More precisely, I want my code to do the following:
-Find the name I want in workbook1
-Copy entire row
- Paste entire row in workbook2
What I've written so far is the following but I get "Run-Time error '13' Type mismatch"
Private Sub ImportData_Click()
Dim FundRow As Range
Workbooks("Workbook1").Sheets("Sheet2").Range("F5:F10000").Cells.Find(What:=CStr(Cells(4, 7).Value), After:=Cells(1, 1), MatchCase:=False).Activate
FundRow = ActiveCell.Rows.Copy(Destination:=Workbooks("Workbook2").Sheets("Sheet2").Cells(6, 1))
End Sub
Anyone can help me with that?
thanks
I'm quite new to vb and I'm trying towrite a code to import data from another workbook.
More precisely, I want my code to do the following:
-Find the name I want in workbook1
-Copy entire row
- Paste entire row in workbook2
What I've written so far is the following but I get "Run-Time error '13' Type mismatch"
Private Sub ImportData_Click()
Dim FundRow As Range
Workbooks("Workbook1").Sheets("Sheet2").Range("F5:F10000").Cells.Find(What:=CStr(Cells(4, 7).Value), After:=Cells(1, 1), MatchCase:=False).Activate
FundRow = ActiveCell.Rows.Copy(Destination:=Workbooks("Workbook2").Sheets("Sheet2").Cells(6, 1))
End Sub
Anyone can help me with that?
thanks