' Populate a Listbox Using the Contents of a Text File


Sub Window_Onload
    ForReading = 1
    strNewFile = "computers.txt"
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFile = objFSO.OpenTextFile _
        (strNewFile, ForReading)
    Do Until objFile.AtEndOfStream
        strLine = objFile.ReadLine
        Set objOption = Document.createElement("OPTION")
        objOption.Text = strLine
        objOption.Value = strLine
        AvailableComputers.Add(objOption)
    Loop
    objFile.Close
End Sub
search for scripts

VbsEdit contains all these sample scripts!


Download Now!



Download   Home   Scripts

Copyright © 2001-2024 adersοft