TextStream.Write Method

Named Arguments

Yes

Syntax

oTextStreamObj.Write(Text)

oTextStreamObj

Use: Required

Data Type: TextStream object

Any object variable returning a TextStream object.

Text

Use: Required

Data Type: String

Any string expression to write to the file.

Description

Writes a string to the text file.

Rules at a Glance

The file marker is set at the end of string. As a result, subsequent writes to the file adjoin each other, with no spaces inserted. To write data to the file in a more structured manner, use the WriteLine method.

See Also

TextStream.WriteBlankLines Method, TextStream.WriteLine Method

Get VB & VBA in a Nutshell: The Language now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.