Results 1 to 6 of 6
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    import txt file in listbox (2000 sr-1)

    How to import in listbox this txt file addmitting is in c:my_dir....

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: import txt file in listbox (2000 sr-1)

    You know how to open and read text files; you can use the AddItem method of the list box to add items to it.

    But there is something with the text file - look at the last line.

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: import txt file in listbox (2000 sr-1)

    Peraph, solved....
    but how to format column???
    Attached new txt and wbook.
    Note:use button APRI TXT

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: import txt file in listbox (2000 sr-1)

    What kind of format do you want? You could set the font for the list box to Courier New, that would make the data more readable.

  5. #5
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: import txt file in listbox (2000 sr-1)

    Yes but....
    i want import thsi txt file in this mode:
    first column of txt in column 1 of listbox
    second column of txt in column 2 of listbox
    third column of txt in column 3 of listbox
    ...
    ecc...

    in other case my currier start from 10 is big...

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: import txt file in listbox (2000 sr-1)

    One way would be to store the lines in a worksheet, then use TextToColumns to split the line into separate columns. Set the RowSource property of the list box to the imported range.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •