Private Sub Command1_Click()
Dim s As String, resule As String, pos As String
Dim count As Integer, i As Integer
i = 1: count = 0: resule = "": pos = ""
Do While i <= Len(Text1.Text) ‘ i 是查找过程中所查找到的当前字符位置的标记
s = Mid(Text1.Text, i, Len(Text2.Text))
If s =Then
result = result + Text3.Text
count = count + 1
pos = ‘pos 依次显示被替换内容在原文中的起始位置
i = i + Len(Text2.Text)
Else
result=result+Mid(text1.text,i,1)
End If
Loop
Text4.Text = result
Text5.Text =
Text6.Text = pos
End Sub