I need to find out how to populate a combo box using either an ini or a txt file. I know it is possible I have seeen it done but I have not seen the code. This is probably something really basic but my brain is not working today.
Printable View
I need to find out how to populate a combo box using either an ini or a txt file. I know it is possible I have seeen it done but I have not seen the code. This is probably something really basic but my brain is not working today.
I know how to do it if the Textfile has quotes around
each string and the strings are on seperate lines.
All you have to do is open the file and do a loop of insterting strings into the combobox until the end of file.
[Edited by Megatron on 05-04-2000 at 05:18 PM]Code:Dim strVal as String
Open "Myfile.txt" for input as #1
Do While Not EOF(1)
input #1, strVal
combo1.additem(strVal)
Loop
Close #1