When I run the program with the following:
sent="What you don't know won't hurt you"
word="know"
replace="owe"
the result is: What you don't owew won't hurt you
How can I get it to replace 'know' and not just 'kno' ?
Thanks,
Levells
Code:
Private Sub cmdCompute_Click()
    Dim sent, word, replace As String
    sent = txtSent.Text
    word = txtWord.Text
    replace = txtReplace.Text
    picbox.Cls
    picbox.Print "The original sentence was: "; sent
    picbox.Print "You replace "; word; " with "; replace; " and the result is:"
    Mid(sent, InStr(sent, word), Len(txtWord.Text)) = replace
    picbox.Print sent
End Sub