Results 1 to 3 of 3

Thread: ListBox's and Parsing Conversion

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    2
    Okay, here it goes...
    I need to take a whole listbox and save it to a file, easy enough. But the list box is Tab delimited and such to make it look pretty, problem is, I want the exported file to be comma delimited. I've figured out how to import a comma delimited file into the list box and have it end up nicely tab delimited, but the other way around is a mystery to me. Any suggestions?
    Thanks Brad

  2. #2
    Lively Member
    Join Date
    Aug 2000
    Posts
    125
    perhaps using the replace function will turn your vbTab chars into ","

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Posts
    2
    I'm not sure it's cooth to answer your own question, but here's how I ended up doing it.


    For save = 0 To List1.ListCount - 1
    ICat2$ = ParseString(List1.List(save), vbTab, 1)
    IName2$ = ParseString(List1.List(save), vbTab, 2)
    ICode2$ = ParseString(List1.List(save), vbTab, 3)
    IPrice2$ = ParseString(List1.List(save), vbTab, 4)
    IQty2$ = ParseString(List1.List(save), vbTab, 5)
    Print #fFile, ICat2$ & "," & IName2$ & "," & ICode2$ & "," & IPrice2$ & "," & IQty2$
    Next save


    Just so anybody else that wants to know, does. Thanks.
    Brad

Posting Permissions

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



Click Here to Expand Forum to Full Width