Option Explicit
Sub Createtextfile()
Dim TF As Object
Dim TFT As Object
'만들기
Set TF = CreateObject("scripting.filesystemobject")
Set TFT = TF.Createtextfile(Application.ActiveWorkbook.Path + "\l10n.js")
'Debug.Print (Application.ActiveWorkbook.Path)
'내용넣기
TFT.WriteLine "this is just test file" & vbCr & "afs"
TFT.WriteLine "this is 2nd line of test file"
TFT.WriteLine ActiveSheet.Name
'닫기
TFT.Close
Set TF = Nothing
Set TFT = Nothing
End Sub
댓글 없음:
댓글 쓰기