Private Sub Command1_Click()Text3 = ""Dim n As IntegerFor i = 1 To Len(Text1)If Mid(Text1, i, Len(Text2)) = Text2 ThenText3 = Text3 & Mid(Text1, i, Len(Text2) + 8)n = n + 1End IfNext iMsgBox "找到" & n & "行"End Sub...
dim spl() as string ,coun as integerspl = split(text1.text ,vbcrlf)dim i as integerfor i = 0 to ubound(spl)if instr(spl(i),text2.text)>0 then
coun=coun+1
text3....