Sub メモ帳に作成()
Dim i As Long
'ファイルを追記モードで開く
Open "C:\Desktop\新しいフォルダー (2).txt" For Append As #1
Print #1, "テストテスト"
Print #1, "テストテスト"
Print #1, "テストテスト"
Print #1, "テストテスト"
Print #1, ""
'開いたファイルに書き込む
For i = 1 To 12
If Cells(i, 1) = Date And Cells(i, 6) = "テキスト" Then
Print #1, "顧客コード" & Cells(i, 4).Value
Print #1, "〇〇番号" & Cells(i, 5).Value
Print #1, ""
End If
Next
'開いたファイルを閉じる
Close #1
'終わったのが分かるようにメッセージを出す
MsgBox "完了!"
End Sub