謝謝前輩指導
謝謝論壇
Option Explicit
Sub CreateObject_Scripting_FileSystemObject_AND_OpenTextFile()
Dim fs, a
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile(ThisWorkbook.Path & "\" & Format(Date, "yyyymmdd") & ".txt", True)
a.WriteLine ("This is a test.")
a.Close
'https://learn.microsoft.com/zh-tw/office/vba/language/reference/user-interface-help/filesystemobject-object
End Sub
Sub CreateObject_ADODB_Stream()
'https://club.excelhome.net/thread-868093-1-1.html
End Sub