如何用VB编写替换.txt文件里的指定字符啊?
展开全部
dim k as string,s as string
ffff = combo1.text
open "路径.txt" for input as #1 '读出
do while not eof(1)
line input #1 ,k
s = s & k & vbcrlf
loop
close #1
s = replace(s,"dddd",ffff)
open "路径.txt" for output as #1 '写入
print #1 , s
close #1
ffff = combo1.text
open "路径.txt" for input as #1 '读出
do while not eof(1)
line input #1 ,k
s = s & k & vbcrlf
loop
close #1
s = replace(s,"dddd",ffff)
open "路径.txt" for output as #1 '写入
print #1 , s
close #1
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询