Private Sub Command1_Click()
Dim arr, s As String
s = InputBox("输入字串:", , "you")
If InStr(Text1, s) > 0 Then
arr = Split(Text1, s)
MsgBox s & "共找到:" & UBound(arr)
Else
MsgBox "未找到:" & s
End If
End Sub
Private Sub Form_Load()
Text1 = "I like you do you like me!"
End Sub