Private sub 查找_Click()
If Trim(Text1.text) <> "" then
Text2.Text = ""
Open "C:\Text1.txt" for input as #1
If LOF(1) <> 0 Then
Do While Not EOF(1)
Line Input #1, NewLine
If Instr(1,NewLine,Trim(Text1.text)) <> 0 then
Text2.text = IIF(Text2.text = "",NewLine,Text2.Text & vbCrLf & NewLine)
Endif
Loop
Else
Msgbox "没有数据可查询!"
Endif
Close #1
Else
Msgbox "请输入查询数据!"
Text1.SetFocus
Endif