here is a drop in procedure that lets you enter the filename into the parameters along with the listbox to list them in.
the procedure will produce a list that looks as following:
DOMAIN\USERNAME
DOMAIN\USERNAME
DOMAIN\USERNAME
is this what you are looking for? It is basically the same as my example above, but with a few changes.
Public Sub LoadAccountList(ByVal filename As String, ByRef lstBox As ListBox)
If lstBox Is Nothing Then Return
If filename = "" Then Return
Dim fNameExist As Boolean = FileIO.FileSystem.FileExists(filename)
If Not fNameExist Then Return
Dim filereader As IO.StreamReader = New IO.StreamReader(filename)
While Not filereader.EndOfStream
Dim curLine As String = filereader.ReadLine.Trim
If curLine.Contains(LCase("_vs")) Then
Dim arr() As String = Strings.Split(curLine, " = ")
curLine = arr(1)
curLine = curLine.Replace("""", "")
If curLine <> "" Then
curLine = curLine.Replace("\\", "\")
curLine = Strings.Left(curLine, curLine.Length - 4)
lstBox.Items.Add(curLine)
End If
End If
End While
filereader.Close()
filereader.Dispose()
End Sub