"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!
 
Everything it's perfect now, JackDanIce. Thank you so much for your help. Best regards!
 
Upvote 0

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,221,322
Messages
6,159,231
Members
451,547
Latest member
loop98

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