Problem mit VBA Code!
Franz
ich benötige kurz Eure Hilfe bei einem Teil eines VBA Codes. Sobald ich diesen Code ausführen will, bekomme ich den Laufzeitfehler 91 "Objektvariable nicht festgelegt!. Ich versteh aber nicht warum das Ganze erscheint.
Irgendwie hab ich im Moment ein Brett vorm Kopf!
lngdb = db.Range("A65536").End(xlUp).Row
lngpl = pl.Range("A65536").End(xlUp).Row
lngL1 = 3
lngL2 = 3
Set rngpl = pl.Range("A10:A" & lngpl)
Set rngdb = db.Range("A3:B" & lngdb)
For Each rng In rngdb
Set rFind = rngpl.Find(What:=rng, LookIn:=xlValues, LookAt:=xlWhole)
i = rng.Cells.Row
j = rng.Cells.Column
If rFind Is Nothing And db.Cells(i, 3) = "" And db.Cells(i, 4) = "" Then
re.Cells(lngL1, 2) = rng
lngL1 = lngL1 + 1
Else
If rFind.Offset(0, 11) = "NA" Then
re.Cells(lngL2, 5) = rng
re.Cells(lngL2, 4) = db.Cells(i, 3)
lngL2 = lngL2 + 1
End If
End If
Next
Vielen Dank und Gruß
Franz