Results 1 to 2 of 2

Thread: After Using Common Dialog

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2001
    Location
    Utah, USA
    Posts
    121

    After Using Common Dialog

    Code:
    CMD.Flags = cdlOFNAllowMultiselect + cdlOFNExplorer + cdlOFNHideReadOnly
    CMD.Filter = "TXT Files (*.TXT)|*.txt"
    CMD.ShowOpen
    So I do something like that, now I want (i guess) create an array with the name of the File for one ~column~ and the full path for another. It returns Null charachters as seperators. So I have

    c:\path\path(null)then file name.txt(null)another.txt

    I need to somehow seperate it into an array as described above then put the file names (preferably without .txt) in a ListBox when a line is clicked in a listbox display the appropriate path in a textbox. How do I filter a string like that, first for nulls then whatever, please help!

    I think I can do that part it is just seperating/building the array where I need help.

    Any recomendations would be great.

    Zevlag
    Josh -- Name
    Zevlag13 -- AIM

    www.WotsIt.org for all your file format spec questions!

  2. #2
    sunnyl
    Guest
    What you need is the Split function! Pass it the string and the delimiter and it'll create the array for you!

    eg

    Code:
    Dim Str As String
    Dim Cut() As String
    
    Str = "1|2|3"
    
    Cut() = Split(Str, "|")
    Now Cut(0) will = 1, Cut(1) = 2, Cut(2) = 3. You can applt this concept to your case

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