I have been searching all over for a way to open a text file that was created using vb.net on one form and open that same text file and place the contents into a list view. The text file will have a description, a part number, and a quantity, this is for parts of a copier. This file will have multiple multiple parts (example fuser, drum, developer) each has their own part number, description, and quantities.
Here is the code that I used to make and save the file, I think I might need to change the code so I can have all three items on one line.
Dim txt As String txt = TextBox1.Text My.Computer.FileSystem.CreateDirectory("C:\Copiers\" & txt & "\") Dim sFilename As String sFilename = ("C:\Copiers\" & txt & "\") & TextBox2.Text & ".txt" Dim i As Integer Dim aryText(3) As String aryText(0) = TextBox3.Text aryText(1) = TextBox4.Text aryText(2) = TextBox5.Text Dim objWriter As New System.IO.StreamWriter(sFilename, True) For i = 0 To 2 objWriter.WriteLine(aryText(i)) Next objWriter.Close() MsgBox("Text Appended To the File") TextBox3.Clear() TextBox4.Clear() TextBox5.Clear() If CheckBox1.Checked Then Me.Close() End If End Sub
But when I go to the first form I have two comboxes, one is to open the folder and the other displays the files in that folder. I need help to pull the information from the file and place the items in their respective columns. Everything I found is based on account and password and it is not working for me. I just need to open the file read the line and place them where they need to go.