Excel VBAファイル出力

[vb]
Option Explicit

Sub CreateFile()

Dim StrFileName As String
Dim intFileNo As Integer

StrFileName = ActiveWorkbook.Path & "out.txt"
intFileNo = FreeFile

Open StrFileName For Output As #intFileNo

Write #intFileNo, "これはWriteテストです。"
Print #intFileNo, "これはPrintテストです。"

Close #intFileNo

End Sub
[/vb]

This entry was posted in Excel, 技術情報. Bookmark the permalink.

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です