ich brauche Hilfe bitte!
Im Folgenden Code verliert cl seinen Wert und die Schleife kann nicht fortgesetzt werden.
Set ws = Worksheets("Gattungen")
Set oRange = Range("A3:A750")
SearchString = "C"
With oRange
Set cl = .Find(What:=SearchString, LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlPrevious)
If Not cl Is Nothing Then
clAddress = cl.Address
Do
cl.Offset(0, 2).Select
WKN = ActiveCell
Workbooks(Makler2).Worksheets("Ergebnis").Activate
Set bereichs = Sheets("Ergebnis").Range("B3:B750")
Set zelles = bereichs.Find(What:=WKN, LookAt:=xlWhole, LookIn:=xlValues)
If zelles Is Nothing Then
Workbooks(Datentool).Worksheets("Gattungen").Activate
Range(Cells(lngr + 1, 1), Cells(700, 1)).Select
GoTo x4
Else
zelles.Select
lngr1 = ActiveCell.Row
lngc1 = ActiveCell.Column
End If
Summe = Cells(lngr1, 3)
Workbooks(Ergebnis).Worksheets("Gruppe C").Activate
If wochentag = "Sonntag" Then
Set bereichs = Sheets("MDax").Range("A1:KH1")
Set zelles = bereichs.Find(What:=Vortag2, LookAt:=xlWhole, LookIn:=xlValues)
zelles.Select
lngcV = ActiveCell.Column
Else
Set bereichs = Sheets("Gruppe C").Range("A1:KH1")
Set zelles = bereichs.Find(What:=Vortag, LookAt:=xlWhole, LookIn:=xlValues)
zelles.Select
lngcV = ActiveCell.Column
End If
Set bereichs = Sheets("Gruppe C").Range("B4:B155")
Set zelles = bereichs.Find(What:=WKN, LookAt:=xlWhole, LookIn:=xlValues)
zelles.Select
lngrV = ActiveCell.Row
Cells(lngrV, lngcV).Select
ActiveCell = Summe
Workbooks(Datentool).Worksheets("Gattungen").Activate
x4:
Set cl = .FindNext(cl)
Loop While Not cl Is Nothing And cl.Address clAddress
End If
End With