vb里读取任意一个txt文件的内容保存到x的变量当中的代码

2024-12-14 18:51:01
推荐回答(1个)
回答1:

Open App.Path + "\1.txt" For Input As #1
Do While Not EOF(1)
Dim tmp,As String
Line Input #1, tmp
' InStr(1, tmp, "key")在这里找有没有变量的关键字,不然谁知道什么变量什么类型?
Doevents
Loop
Close #1