"runtime error 1004 method range of object _global failed" VBA error

Yulyo

Board Regular
Joined
Jul 17, 2017
Messages
94
Hello all,

Please help with an "runtime error 1004 method range of object _global failed" error, that i recieve in this vba. I have around 10 more VBAs before this one, none of them return an error, but this one (they are identical, only page numbers a different):



=============================================
Sub actualizare()
Dim lastRw1, lastRw2, nxtRw, m
Dim StartRow, x
Dim StartDate As String
Dim FndRw As String




lastRw1 = Sheets(11).Range("B" & Rows.Count).End(xlUp).Row




StartDate = Range("908!A21").Value




For StartRow = 1 To lastRw1
If Range("19_01!B" & StartRow).Value = StartDate Then




FndRw = StartRow
Exit For
End If
Next




Range("19_01!AM" & FndRw & ":AM" & lastRw1).ClearContents






lastRw2 = Sheets(15).Range("A" & Rows.Count).End(xlUp).Row




For nxtRw = 1 To lastRw2




With Sheets(11).Range("B2000:B" & lastRw1)




Set m = .Find(Sheets(15).Range("A" & nxtRw), lookat:=xlWhole)




If Not m Is Nothing Then
Sheets(15).Range("B" & nxtRw).Copy _
Sheets(11).Range("AM" & m.Row)




End If
End With
Next
End Sub
=============================================


Thank you!
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top