1,216
社区成员
发帖
与我相关
我的任务
分享
Open (App.Path & "\系统日志.ini") For Append As #1 'Append 方式就是追加
TStr = Format(Now, "yyyy-mm-dd hh:mm:ss") & " " & _
"内容" & " " & Text1(1).text + " " & _
"内容" & " " & Text1(2).text + " " & _
"内容" & " " & DataCombo1 & " " & _
"内容" & " " & Text1(3).text & " " & _
"内容" & " " & Text1(4).text & " " & _
"内容" & " " & Text1(5).text '只需要追加的内容,还有连接字符串要用 &
Print #1 TStr
Close #1
Option Explicit
Sub Main()
App.StartLogging App.Path & "\" & App.EXEName & ".log", vbLogToFile
If App.LogMode <> vbLogToFile Then
MsgBox "需要编译成 exe 执行才能输出到.log 文件中。", vbExclamation
Exit Sub
End If
Dim i As Long
For i = 1 To 300
App.LogEvent Now() & Format(i, "@@@@") & Space(1000)
Next
End Sub