Code:
Private Sub cmdReplace_Click()
Dim Position As Long
Position = 0
While Not EndOfString
Position = frmMain.rtfQuickEdit.Find(txtSearch, Position, Len(frmMain.rtfQuickEdit))
With frmMain.rtfQuickEdit
.SelStart = Position
.SelLenght = Len(txtSearch)
.SelText = Replace(frmMain.rtfQuickEdit, txtSearch, txtReplace, , , vbTextCompare)
.SetFocus
End With
Loop
End Sub
Private Sub cmdReplace_Click()
Dim Position As Long
Position = 0
While Not EndOfString
Position = frmMain.rtfQuickEdit.Find(txtSearch, Position, Len(frmMain.rtfQuickEdit))
With frmMain.rtfQuickEdit
.SelStart = Position
.SelLenght = Len(txtSearch)
.SelText = Replace(frmMain.rtfQuickEdit, txtSearch, txtReplace, , , vbTextCompare)
.SetFocus
End With
Loop
End Sub
'This is a unique time in our history, in the history of any civilization, it's the moment of the acquisition of technology, that's the moment when contact becomes possible'