可以,但我不一定什么时候有时间看,刚才顺便整了个搜索
Dim 行内容 As String
Dim 判断内容存在 As Boolean = False
For i = 0 To Rich.Lines.Count - 1
行内容 = Rich.Lines(i)
If 行内容.Contains(TextBox3.Text) Then
TextBox4.Text = Rich.Lines(i).Split(",")(0)
判断内容存在 = True
Exit For
End If
Next
If 判断内容存在 = False Then
MsgBox("关键字不存在")
End If
