The usage of the VBS property Line
This article mainly explains "the usage of VBS attribute Line". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn the usage of VBS attribute Line.
Read-only property that returns the current line number in the TextStream file.
Object.Line
Object is usually the name of the TextStream object.
Description
The file has just been opened and Line equals 1 before any information is written.
The following example illustrates how to use the Line property:
Function GetLine Const ForReading = 1, ForWriting = 2 Dim fso, f, ra Set fso = CreateObject ("Scripting.FileSystemObject") Set f = fso.OpenTextFile ("c:\ testfile.txt", ForWriting, True) f.Write "Hello world!" & vbCrLf & "VB script is very interesting!" & vbCrLf Set f = fso.OpenTextFile ("c:\ testfile.txt", ForReading) ra = f.ReadAll GetLine = f.Line End Function so far I believe you have a deeper understanding of the use of "VBS attribute Line", so you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!