vb 修改 txt
简介:
引用:http://zhidao.baidu.com/question/87991141.html
假设你的文件名为“C:\a1.txt”
dim txt as string
Open "C:\a1.txt" for input as #1
Open "C:\a2.txt" for output as #2
do while not eof(1)
line input #1, txt
if txt="f=-50000" then txt="f=" & Text1.Text
print #2,txt
loop
close
运行结束后,a2.txt中就是修改后的文件。
引用:http://zhidao.baidu.com/question/87991141.html
假设你的文件名为“C:\a1.txt”
dim txt as string
Open "C:\a1.txt" for input as #1
Open "C:\a2.txt" for output as #2
do while not eof(1)
line input #1, txt
if txt="f=-50000" then txt="f=" & Text1.Text
print #2,txt
loop
close
运行结束后,a2.txt中就是修改后的文件。