i made a word processor, and now i need want to put a "search" feature on it. How do i code it?

so far i have this:

FindOver = False
SearchPos = 0
FindText Text, Find
Text.SelStart = SelTextFrom
Text.SelLength = SelTextTo

but, that doesn't work....

can anyone help me????

thanks, kirkhammet