hi...iam beginner need help..
I want to insert (retrieve) text file which is consist of multiple line into list box
Example:
1170302000386 X18 COBA 1 20,000,000 41 1,000,000 258,333 1,258,333 19,000,000 60
1170302000399 X18 COBA 2 33,333,320 41 1,666,667 430,555 2,097,222 31,666,653 60
then I used code like this:
	
	
	
		
then the result like this:
1170302000386 X18 COBA 1 20
1170302000399 X18 COBA 2 33
my question is:
Why after comma is missing then continue to next row and so on and so on.
Please..probably u can help me so the text can retrieve all the content in the line
Thx
 I want to insert (retrieve) text file which is consist of multiple line into list box
Example:
1170302000386 X18 COBA 1 20,000,000 41 1,000,000 258,333 1,258,333 19,000,000 60
1170302000399 X18 COBA 2 33,333,320 41 1,666,667 430,555 2,097,222 31,666,653 60
then I used code like this:
		Code:
	
	
	Dim f As Office.FileDialog
Dim str As String
FileList.RowSource = ""
Dim strListItems As String
Dim data As String
Set f = Application.FileDialog(msoFileDialogFilePicker)
f.AllowMultiSelect = False
f.Title = "Choose File"
f.Filters.Clear
f.Filters.Add "TXT", "*.txt*"
If f.Show Then
str = Application.FileDialog(msoFileDialogOpen).SelectedItems(1)
Open str For Input As #1
   While Not EOF(1)
    Line Input #1, strListItems
    FileList.AddItem strListItems
    x = x + 1
   Wend
Close #1
FileName = str
End Ifthen the result like this:
1170302000386 X18 COBA 1 20
1170302000399 X18 COBA 2 33
my question is:
Why after comma is missing then continue to next row and so on and so on.
Please..probably u can help me so the text can retrieve all the content in the line
Thx
			
				Last edited by a moderator: 
			
		
	
								
								
									
	
		
			
		
		
	
	
	
		
			
		
		
	
								
							
							 
	 
 
		 
 
		
 
 
		
 
 
		 
 
		 
 
		 
 
		 
 
		