Jump to content

  • Log In with Google      Sign In   
  • Create Account


VB help with reading from file to combobox


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 thomashun   Members   -  Reputation: 100

Like
Likes
Like

Posted 23 July 2001 - 01:32 AM

ok I got a .txt that goes something like this 3 "Name" "other name" "street" 2 1 Well anyway how do you read the "Name" into the combobox because i keep getting all the info to read in instead of just the name.

Sponsor:

#2 noparity   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 July 2001 - 05:07 AM

Use a TextStream to read in one line at a time:
In your project, set a reference to Microsoft Scripting Runtime

dim fso as new FileSystemObject
dim ts as TextStream

set ts = fso.OpenTextFile("name", I/O mode etc...)

Do While ts.AtEndOfStream = False
Combo1.AddItem (ts.ReadLine)
Loop

ts.Close


Edited by - noparity on July 23, 2001 12:16:06 PM

#3 thomashun   Members   -  Reputation: 100

Like
Likes
Like

Posted 23 July 2001 - 05:46 AM

Thank you very much for the help assalum alikum i think thats how you spell it.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS