Example - Put Statement

  1. Sub Main ()

  2.     Dim myText As String

  3.     Dim myFileContents As String

  4.     Open "d:\temp\test.txt" For Output As #1 ' Open to write file.

  5.     myText = InputBox("Type some text to add to the file")

  6.     Put #1,,myText 'Writes the text to the file assigned to #1.

  7.     Close #1

  8. End Sub