list box item

Discussion in 'AutoCAD' started by elise_moss, Mar 16, 2005.

  1. elise_moss

    elise_moss Guest

    I want to get the itemno for the list text selected from a list box. I want to be able to correspond some data from two text files...one txt file populates the list box and the second txt file lists a corresponding file that would be opened based on the line selected in the list box.

    I know it is something like Set itemno = List.ListItem(?)

    Thanks,

    Elise Moss
    www.mossdesigns.com
     
    elise_moss, Mar 16, 2005
    #1
  2. elise_moss

    Gary Fowler Guest

    See example I posted in customer-files under "List Box"
    It is close to what you want.....
     
    Gary Fowler, Mar 16, 2005
    #2
  3. elise_moss

    elise_moss Guest

    Sorry, I know how to do it in lisp...I meant to post the question in the VB group.

    Thanks, though.

    Elise
     
    elise_moss, Mar 16, 2005
    #3
  4. elise_moss

    ECCAD Guest

    I think you can get it like this:
    Set itemno = List(ListIndex)
    Assumes your 'list' object called 'List'.

    I use the following in VB6:

    If lstCsvFiles.List(lstCsvFiles.ListIndex) <> "" Then
    ...
    where lstCsvFiles is a control (list box).

    Bob
     
    ECCAD, Mar 17, 2005
    #4
  5. elise_moss

    elise_moss Guest

    That's closer to what I want, but that syntax does not work.
     
    elise_moss, Mar 18, 2005
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.