Sub
Suchen_Daten()
Dim
text1
As
Variant
Dim
rng
As
Range
Dim
rngFind
As
Range
Dim
bReady
As
Boolean
text1 = DialogSheets(
"Dialog1"
).[Bearbeitungsfeld 106].Text
Range(
"A1"
).
Select
On
Error
Resume
Next
Set
rngFind = Cells.Find(What:=text1, After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False
, SearchFormat:=
False
)
If
Not
rngFind
Is
Nothing
Then
Set
rng = rngFind
Do
Set
rng = Cells.FindNext(rng)
If
Intersect(rngFind, rng)
Is
Nothing
Then
Set
rngFind = Union(rng, rngFind)
Else
bReady =
True
End
If
Loop
While
Not
bReady
If
Not
rngFind
Is
Nothing
Then
rngFind.
Select
End
If
End
If
End
Sub