【書式】
TextStream.Close
開いているテキストファイルを閉じます。
Sub test76()
Dim FSO As Object, buf As String
Set FSO = CreateObject("Scripting.FileSystemObject")
With FSO.GetFile("C:\Work\Sample.txt").OpenAsTextStream
buf = .ReadLine
MsgBox "次は、" & .Line & "行目から読み込みます"
''ファイルを閉じます
.Close
End With
Set FSO = Nothing
End Sub