looking for some solutions? You are welcome.

SOLVED: How to create text file using VBA for Excel for MacOS

meMadhav:

I am trying to create a file and save text into it. I tried below code but when I am using write #1, script will just replace existing text with the new text. I tried write #0 but no luck. Any suggestions.

Sub TestResultFile(output As String)
  Dim myFile As String
  myFile = Application.DefaultFilePath & "TestResults.txt"
  Debug.Print myFile
  Open myFile For Output As #1
  Write #1, output
  Close #1
End Sub



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
Share:

No comments:

Recent