ok the following code searches a string but once carried out it will not search for a second occurence if called again ...
Dim StartPos As Long
StartPos = InStr(1, rich.Text, "cat")
''''the proble is that 1 because every time the code is called it will begin to search from the start''''
If StartPos <> 0 Then
rich.SelStart = StartPos - 1
rich.SelLength = Len("cat")
rich.SetFocus
End If
i tried making another variable to be static and hold the startpos but it doesn't work ... how do those programs have 2 options of "find" and "find next" ... how do they remember the last position without it being deleted from memory?
