Get the App
SLTechnology News&Howtos  ›  Development  › 

The usage of the VBS property Line

Shulou Source: shulou.com Published: 2022-06-03 19:53:48 11月12日 Update

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!

Tags: Properties content files learning practical deeper interesting world hello examples information interests names practicality practical objects simple operations methods more friends Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi OPPO Reno Apple Docker macOS