open "c:\1.txt" for input as #1 s = input(1, lof(1)) close #1 msgbox "count of ABC = " & (len(s) - len(replace(s, "ABC", ""))) / 3
Open "TextBox1.Text" For Input As #1 s = Input(1, LOF(1)) Close #1 MsgBox "count of ABC = " & (Len(s) - Len(Replace(s, "ABC", ""))) / 3 End Sub 怎么会报file not found debug进去TextBox1.Text是有值的啊
Open TextBox1.Text把引去了。
Open "TXT文件" For Binary As #1 Text1.Text = Input(LOF(1), 1) Close 1
s = input(1, lof(1))
close #1
msgbox "count of ABC = " & (len(s) - len(replace(s, "ABC", ""))) / 3
Open "TextBox1.Text" For Input As #1
s = Input(1, LOF(1))
Close #1
MsgBox "count of ABC = " & (Len(s) - Len(Replace(s, "ABC", ""))) / 3
End Sub
怎么会报file not found debug进去TextBox1.Text是有值的啊
Text1.Text = Input(LOF(1), 1)
Close 1