经测试可用,不懂的hi我
Dim name,sex,birth
name=InputBox("请输入姓名")
sex=InputBox("请输入姓别")
birth=InputBox("请输入出生日期")
Set fso=CreateObject("scripting.filesystemobject")
Set file=fso.createtextfile("" & name & ".txt",True)
file.Close
MsgBox name
set fi=fso.opentextfile("" & name & ".txt",2)
s="姓名:"&name&vbCrLf&"姓别:"&sex&vbCrLf&"出生日期:"&birth
fi.write s
fi.close
温馨提示:答案为网友推荐,仅供参考