Hi all,
I've been trying to modify the following code to find the value "Module Index" in column A. I then need the code to save the row number that the value was found in and copy a range from ("A2:V row number")

I keep getting an "object required" error on the following code line

Set intFindrow = wbTargetBook.Sheets(strName).Range("A:A").Find(What:="Module Index", LookIn:=xlValues)

I'm very new to this so the solution could be very easy or very complicated . Any help would be greatly appreciated!

Dim lastrow As Long
Dim strName As String
Dim wbThisBook          As Workbook 'workbook where the data is to be pasted
Dim wbTargetBook        As Workbook 'workbook from where the data is to copied
Dim intFindrow As Integer

strName = Sheets("Hidden Data").Range("N5")
FilePath4 = Sheets("Hidden Data").Range("N4")

    'open a workbook
Set wbThisBook = ActiveWorkbook

   'clear contents currently in cells
wbThisBook.Worksheets("App B").Range("A1:V500").Clear

   'activate the source book
Set wbTargetBook = Workbooks.Open(FilePath4)
wbTargetBook.Activate

   'clear anything on clipboard to maximize available memory
Application.CutCopyMode = False
   
With wbTargetBook.Sheets(strName)
  Set intFindrow = wbTargetBook.Sheets(strName).Range("A:A").Find(What:="Module Index", LookIn:=xlValues)
 
End With
'Copy select data from target book
    wbTargetBook.Sheets(strName).Range("A2:V" & intFindrow).Copy
     
  'Activate main workbook
wbThisBook.Activate
     
   'paste the data in this book
wbThisBook.Sheets("App B").Range("A2").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
wbThisBook.Sheets("App B").Range("A2").PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False

  'clear anything on clipboard to maximize available memory
Application.CutCopyMode = False

  'save the target book
wbTargetBook.Save

  'close the workbook
wbTargetBook.Close

  'activate the source book again
wbThisBook.Activate
  'go back to main input sheet
Sheets("Data Input").Activate

  'clear memory
Set wbTargetBook = Nothing
Set wbThisBook = Nothing

End Sub