'text1的MultiLine属性 设置为True Private Sub Form_Load() Text1.Text = "" Open "g:\1.txt" For Input As #1 While Not EOF(1) Line Input #1, a If InStr(1, a, "9") > 0 Then Text1.Text = Text1.Text & a & vbCrLf End If Wend Close #1 End Sub
for i=1 to 5 if pos(a[i],'9')>0 then msgbox a[i] end if next
第3个回答 2009-10-24
Text1.Text = "" Open "g:\1.txt" For Input As #1 While Not EOF(1) Line Input #1, a If InStr(1, a, "9") > 0 Then Text1.Text = Text1.Text & a & vbCrLf Wend Close #1