VB 修改文本内容

来源:百度知道 编辑:UC知道 时间:2024/06/19 00:48:38
VB怎么完成修改文本内容,
比如1改成20,TXT的文件

txt 文本文件?

open "c:\a.txt" for output as #1
print #1,"Hahaha"
close #1
'保存文本"Hahaha"到"c:\a.txt"
'

dim inp as string,alP as string
open "c:\a.txt" for output as #1
do while not eof(1)
line input #1,inp
alp=alp & vbcrlf & inp
loop
close #1

msgbox alp
'从"c:\a.txt"读取
'