写入
v=1011
Shell ("cmd.exe /S /C echo " + CStr(v) + ">a.txt")
Application.Wait (Now + 0.000001)
读取
Open "a.txt" For Input As #1
Line Input #1, txt
MsgBox txt
Close #1
VBA-5: 读写txt
阅读 35
2022-02-21
v=1011
Shell ("cmd.exe /S /C echo " + CStr(v) + ">a.txt")
Application.Wait (Now + 0.000001)
Open "a.txt" For Input As #1
Line Input #1, txt
MsgBox txt
Close #1
相关推荐
精彩评论(0)