Hi,
I am getting a "Run-time error '1004' Application-defined of object-defined" error when running this, and was wondering if you could help.
The part of the code that gets highlighted upon debugging is this:
"Worksheets(i).Range(Cells(FindRowNumber, 1), Cells(FindRowNumber + 16, 2)).Copy"
and this is the code surrounding that:
"J = ThisWorkbook.Worksheets.Count
For i = 6 To J - 3
Dim Worksheet_name As String
Dim FindRow As Range
Dim FindRowNumber As Integer
Worksheet_name = Worksheets(i).Name
With Sheets(i).Range("A1:A1000")
Set FindRow = .Find(What:="PAYMENT SCHEDULE", LookIn:=xlValues)
End With
If Not FindRow Is Nothing Then
FindRowNumber = FindRow.Row
Worksheets(i).Range(Cells(FindRowNumber, 1), Cells(FindRowNumber + 16, 2)).Copy"
Let me know if you have any questions. I hope someone can help
Thank you kindly,
Tom.
I am getting a "Run-time error '1004' Application-defined of object-defined" error when running this, and was wondering if you could help.
The part of the code that gets highlighted upon debugging is this:
"Worksheets(i).Range(Cells(FindRowNumber, 1), Cells(FindRowNumber + 16, 2)).Copy"
and this is the code surrounding that:
"J = ThisWorkbook.Worksheets.Count
For i = 6 To J - 3
Dim Worksheet_name As String
Dim FindRow As Range
Dim FindRowNumber As Integer
Worksheet_name = Worksheets(i).Name
With Sheets(i).Range("A1:A1000")
Set FindRow = .Find(What:="PAYMENT SCHEDULE", LookIn:=xlValues)
End With
If Not FindRow Is Nothing Then
FindRowNumber = FindRow.Row
Worksheets(i).Range(Cells(FindRowNumber, 1), Cells(FindRowNumber + 16, 2)).Copy"
Let me know if you have any questions. I hope someone can help
Thank you kindly,
Tom.