Close Method

Closes an open TextStream file.

object.Close

The object is always the name of a TextStream object.

Remarks

The following example illustrates use of the Close method to close an open TextStream file:

Sub CreateAFile
   Dim fso, MyFile
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set MyFile = fso.CreateTextFile("c:\testfile.txt", True)
   MyFile.WriteLine("This is a test.")
   MyFile.Close
End Sub

See Also

Read Method | ReadAll Method | ReadLine Method | Skip Method | SkipLine Method | Write Method | WriteLine Method | WriteBlankLines Method

Applies To: TextStream Object

Сайт создан в системе uCoz