vb6读取某个文本内容
答案:1 悬赏:20 手机版
解决时间 2021-03-27 11:31
- 提问者网友:蔚蓝的太阳
- 2021-03-27 01:47
vb6读取某个文本内容
最佳答案
- 五星知识达人网友:独行浪子会拥风
- 2021-03-27 02:05
dim s as string, a() as string
open "d:\a.txt" for input as #1
do while not eof(1)
line input #1,s
a=split(s,",")
if ubound(a)>4 then
if a(1)=text1.text and a(2)=text2.text then
msgbox s
exit for
end if
end if
loop
close #1追问代码错误 哥们 麻烦你运行下.追答Private Sub Command1_Click()
Dim s As String, a() As String
Open "d:a.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, s
a = Split(s, ",")
If UBound(a) >= 4 Then
If a(1) = Text1.Text And a(3) = Text2.Text Then
MsgBox s
Exit Do
End If
End If
Loop
Close #1
End Sub
open "d:\a.txt" for input as #1
do while not eof(1)
line input #1,s
a=split(s,",")
if ubound(a)>4 then
if a(1)=text1.text and a(2)=text2.text then
msgbox s
exit for
end if
end if
loop
close #1追问代码错误 哥们 麻烦你运行下.追答Private Sub Command1_Click()
Dim s As String, a() As String
Open "d:a.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, s
a = Split(s, ",")
If UBound(a) >= 4 Then
If a(1) = Text1.Text And a(3) = Text2.Text Then
MsgBox s
Exit Do
End If
End If
Loop
Close #1
End Sub
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯