SonicBoomAu
Well-known member
Hi All,
I am trying to search through a text file for heading [TYPE1] and then load the information under that heading into a combo box. Is this possible and what method would I use?
Here is an example of the text file:
[TYPE1]
Type A
Type B
Type C
Type D
[TYPE2]
Type A
Type B
Type C
Type D
[TYPE3]
etc....
The only way I can think of is using the following:
[VB]
Dim sr As StreamReader = File.OpenText(strFullPath)
Dim input As String
input = sr.ReadLine
If input = "[TYPE2]" Then
loop through until input = ""
Somehow load the information into a combo box.
End If
[/VB]
I am trying to search through a text file for heading [TYPE1] and then load the information under that heading into a combo box. Is this possible and what method would I use?
Here is an example of the text file:
[TYPE1]
Type A
Type B
Type C
Type D
[TYPE2]
Type A
Type B
Type C
Type D
[TYPE3]
etc....
The only way I can think of is using the following:
[VB]
Dim sr As StreamReader = File.OpenText(strFullPath)
Dim input As String
input = sr.ReadLine
If input = "[TYPE2]" Then
loop through until input = ""
Somehow load the information into a combo box.
End If
[/VB]