0

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

Edited by dusto

1
Contributor
1
Reply
12
Views
4 Years
Discussion Span
Last Post by dusto
0

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!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.