Name
TextStream.Close Method
Syntax
oTextStreamObj
.Close
Availability
RW
Description
Closes the current TextStream object.
Rules at a Glance
Although calling the Close method does not invalidate the object reference, you shouldn’t try to reference a TextStream object that has been closed.
Programming Tips and Gotchas
After closing the TextStream object, set
oTextStreamObj
toNothing
.If you are writing to a file-based text stream, text is automatically written to the file. You do not have to call the Save method to commit changes to a disk file before calling the Close method.
Get VBScript in a Nutshell, 2nd Edition 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.