Find Previous
Jack
Ich hätte da mal wieder eine Frage
warum springt das makro an dem Punkt Is nothing zum Ende?
Sachlage ist diese, das ein Button vorwärts sucht und ein Zweiter (dieser) wieder zurück zum letzten gefundenen Ergebnis soll.
Dies macht er aber nicht.. er springt "raus"
was könnte eine Ursache sein?
With Worksheets("NC").Columns(3)
If .Cells.FindPrevious(what:=khspez.TextBox1.Value, befor:=ActiveCell, LookIn:=xlValues, SearchOrder:=xlByRows, searchdirection:=xlPrevious) Is Nothing Then Exit Sub
.Cells.FindPrevious(what:=khspez.TextBox1.Value, after:=ActiveCell, LookIn:=xlValues, SearchOrder:=xlByRows, searchdirection:=xlPrevious).Select
raumdef = ActiveCell.Value 'bezeichnung
raumdef1 = ActiveCell.Offset(0, -2).Value 'code
kfa1 = ActiveCell.Offset(0, 2).Value 'Code2
end with
vielen Dank für Eure Mühe
lg