Results 1 to 4 of 4

Thread: Filling a list box with multipe values

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2000
    Posts
    85

    Question

    I want to be able to fill a list box with a file name, the file page size (8.5 x 11) and the number of pages in the file. I would like all of these to be on one line.

    lstSelectedFiles.Additem (filename) & (pgsize) & (pgnum)
    result in the list box is: File.pdf 8.5 x 11 35

    The problem is that when I pass the file name to the second list box it will not open the file because the filename is not correct as it takes into account the page size and the page num.

    lstSourceFiles.text = lstSelectedFiles.text
    result is: File.pdf 8.5 x 11 35

    all I want to pass is the file name, but have not been able to figure out how to do this.

    Any information on how to do this would be great. Thanks for the help.


  2. #2
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658

    Thumbs up Give this a whirl

    Something like :

    Code:
    lstSourceFiles.Text = Left$(lstSelectedFiles.Text, InStr(1, lstSelectedFiles.Text, " ") - 1)
    Iain, thats with an i by the way!

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 2000
    Posts
    85

    Wink

    Thank you very much. I'll give it a try.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jun 2000
    Posts
    85

    Cool

    lain17 the code works perfectly thank you so much!!!!!

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