テキストファイルを作成して入力する

Dim openFileName As String
openFileName = ThisWorkbook.Path & "/sample.txt"
Open openFileName For Output As #1
Print #1, "hoge"
Print #1, "fuga"
Print #1, "piyo"
Close #1