View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Importing a txt file to a ComboBox itens

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/