Hello, a VB newb here. I feel like i'm doing alright, but i'm not sure how to get the readline to process each line, and add that to a string. Here's what I have so far. I know i need to use an intCount = intCount + 1 or something similar (I THINK), but I'm not sure how to adapt the intcount to the readline. I'm not really sure how to use readline either. I am trying to pull the data from the file "Filename" into a string, then display in a combobox.

If ofdOpenFile.ShowDialog() = Windows.Forms.DialogResult.OK Then
        cboLocations.Items.Clear()
        Dim intCount As Integer
        Dim strStations As String
        Dim filenameFile As StreamReader
        filenameFile = File.OpenText("filename.txt")
        strFilename = filenameFile.ReadLine




        'ADD COUNTER OR WHATEVER HERE
        cboLocations.Items.Add(strFilename)
        cboLocations.Enabled = True
End If

nevermind, I got a lot of work to do and i had the wrong idea when i posted this. I will be back with more!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.