作者silvaco ()
看板Visual_Basic
标题[VBA ] 请问输出问题
时间Fri Jun 16 22:21:52 2006
Dim FileNo As Integer
Dim CurrentLine As String
Dim Filename As String
Filename = "C:\Documents and Settings\data.txt"
' Define file name
FileNo = FreeFile ' Establish free file handle
Open Filename For Output As #FileNo ' Open file (writing mode)
Print #FileNo, "This is a line of text" ' Save line
Print #FileNo, "This is another line of text" ' Save line
Close #FileNo ' Close file
请问我要如何才能让data可以变成是一个变数呢??
我想用now()函数把每天的档案存进去~
请问可行吗??该怎麽做呢??
请大家指导一下~~谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.135.251.190
1F:推 dingyuchi:"C:\Documents and Settings\" & Now() & ".txt" 06/17 08:07
2F:→ dingyuchi:Now() 出来的东西你还要改一下 因为有些符号不能当档名 06/17 08:08
3F:推 fumizuki:Format(Now, "yyyymmdd") 06/17 19:00