Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Ok this code works great for importing cobobox options from a text file.....

Dim myStream As New IO.StreamReader("file path")

Dim fileLines As New ArrayList

 

While myStream.Peek <> -1

fileLines.Add(myStream.ReadLine())

End While

 

myStream.Close()

Me.ComboBox1.DataSource = fileLines

 

 

But....

 

 

I have a button on that form that says find job. When the user presses this button it needs to load a text file depending on what the option was they choose from the drop down list. Now I know how to do this if the list is hard coded. You just do if and elseif commands... but I do not know how to code it for something like this where the drop down list can change all the time. Any code examples?

 

Thanks

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...