Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The following is better, as it will properly handle an empty
input file: Dim FName As String Dim FNum As String Dim S As String FName = "H:\test.txt" '<<< CHANGE FILE NAME FNum = FreeFile Open FName For Input As #FNum Do Until EOF(FNum) Input #FNum, S Me.ComboBox1.AddItem S Loop Close #FNum -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Chip Pearson" wrote in message ... Try some code like the following: Dim FName As String Dim FNum As String Dim S As String FName = "H:\test.txt" '<<<< CHANGE FILE NAME FNum = FreeFile Open FName For Input As #FNum Do Input #FNum, S Userform1.ComboBox1.AddItem S Loop Until EOF(FNum) Close #FNum -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "mhferreira " wrote in message ... Please, i need import the data txt file to a combobox list itens How i do it? --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Importing text file, only option to edit existing file | Excel Discussion (Misc queries) | |||
importing file | Excel Discussion (Misc queries) | |||
reading from another file and pasting to current file, "combobox" | New Users to Excel | |||
need help getting combobox to open a file | Excel Programming | |||
Combobox Change Event when file is saved as | Excel Programming |