Click here to Skip to main content
15,892,281 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:
a
b
c
But in text file = abc
How can I make them appear in consecutive lines in the text file?
Give me some examples.
Thanks.
Posted
Comments
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
 
v2
Comments
Pouya Mozafar 11-Aug-13 6:44am    
Thanks
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