Click here to Skip to main content
15,794,593 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I want to add all combobox items to a text file in servers.txt.
I need the items of the text file to be listed line by line but right now all items are printed in one single line.
For example:
my combobox items:
But in text file = abc
How can I make them appear in consecutive lines in the text file?
Give me some examples.
ridoy 11-Aug-13 6:30am    
Show us your code,then it will be easy to help you.

1 solution

Steps to do:
1) using for each ... next[^] go through the collection of combobox items and store it in a string variable (for example: mydata As String) via string concatenation[^] (mydata = mydata & ComboBoxItem),
2) save mydata value to a text file: How to: Write Text to a File[^]

Try! It's simple to achieve ;)
Share this answer
Pouya Mozafar 11-Aug-13 6:44am    
Maciej Los 11-Aug-13 6:47am    
You're welcome ;)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900