Method: Write for TextStream
- Updated2024-09-12
- 1 minute(s) read
FileSystemObject and Dictionary > Methods > Method: Write for TextStream
Method: Write for TextStream
Writes a text into a TextStream file.
Object.Write(Text)
| Object | TextStream Object with this method |
| Text | String Specifies the text. |
The following example creates a text file, writes a text into this file, and then closes the file:
Sub CreateTxtFile(sFile,sText) Dim fso, oMyFile Set fso = CreateObject("Scripting.FileSystemObject") Set oMyFile = fso.CreateTextFile(sFile, True) Call oMyFile.Write(sText) Call oMyFile.Close End Sub
See Also
Related Topics
Command: ExecuteExclusiveBegin | Command: ExecuteExclusiveEnd | Command: ExecuteExclusiveEndAll