Results 1 to 3 of 3

Thread: [RESOLVED] Extracting Info from ListBox

  1. #1

    Thread Starter
    Addicted Member seditives's Avatar
    Join Date
    Jan 2011
    Location
    South of England
    Posts
    151

    Resolved [RESOLVED] Extracting Info from ListBox

    hi, Right.... how do I get information from a ListBox.

    The user will click a date from the list then click a button which will save the date as a file:


    Code:
        Open (App.Path & "\BookInDates\" & lstDates.Text) For Output As #1
    this give the "path not found error" as lstDates.Text = "" when it should equal a date.
    A subtle thought that is in error may yet give rise to fruitful inquiry that can establish truths of great value. - Isaac Asimov

  2. #2
    Frenzied Member
    Join Date
    May 2003
    Location
    Sydney
    Posts
    1,123

    Re: Extracting Info from ListBox

    a listbox has a collection of listboxitems. so you have to get the listboxitem's text, not listbox's text itself. a crude example:
    Code:
    lstDates.SelectedItems(0).Text

  3. #3
    Fanatic Member
    Join Date
    Mar 2009
    Posts
    804

    Re: Extracting Info from ListBox

    Likely because of slashes (/) in the file name. The following characters are
    not allowed in a file name:
    \ / : * ? < > | "

    You state that lstDates.Text = "", so show the code for lstDates_Click

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