About
Pricing
Community
Teams
Start Free Trial
Log in
Ken808
asked on
9/9/2015
Can you Use StreamReader In Public Module / Function- I'm trying Loading Text Files In to a Combo Box vb.net
Hi Guys,
I have a program I'm working on with multiple combo boxes on multiple forms. A lot of the combo boxes are labeled the same name. Ie ComboBox1.
Can you Use StreamReader In Public Module / Function
I'm trying Loading Text Files In to a Combo Boxes. I have multiple forms with same combo boxes. I would like to reduce the amount of code im using...
This is an example of how im reading my text file in to the combo box.
Dim objReader_TextFile1 As New System.IO.StreamReader("c:
\\Text_Fil
es\TextFil
e1.txt")
Do While Not objReader_TextFile1.EndOfS
tream
ComboBox1.Items.Add(objRea
der_TextFi
le1.ReadLi
ne)
Loop
objReader_TextFile1.Close(
)
Or is there a better / different way of doing this?
Visual Basic.NET
.NET Programming
1
1
Last Comment
Mike Tomlinson
8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Mike Tomlinson
9/9/2015
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy