Results 1 to 7 of 7

Thread: [RESOLVED] List question

  1. #1

    Thread Starter
    Member
    Join Date
    May 2008
    Location
    Lexington, KY
    Posts
    59

    Resolved [RESOLVED] List question

    Is it possible to use lists in a multi-column capacity.. such as:

    Oldname/New Name/Date
    Jeff,Bob, 01012008
    Lisa,Tina, 02012008
    Fred, Barney, 01152008


    If so, could someone demonstrate a simple sample for me?

    Thanks
    Jeff
    "Maximum Newbocity has been achieved!"

  2. #2
    Still learning kebo's Avatar
    Join Date
    Apr 2004
    Location
    Gardnerville,nv
    Posts
    3,762

    Re: List question

    are you talking about for viewing the data on a form or for data storage in your code? Both of which are fairly easy to implement.
    kevin
    Process control doesn't give you good quality, it gives you consistent quality.
    Good quality comes from consistently doing the right things.

    Vague general questions have vague general answers.
    A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.

    ______________________________
    Last edited by kebo : Now. Reason: superfluous typo's

  3. #3

    Thread Starter
    Member
    Join Date
    May 2008
    Location
    Lexington, KY
    Posts
    59

    Re: List question

    Just temporarily storing data in my code. I don't want to setup up three different lists. I was hoping to have one list with three elements per row.
    Jeff
    "Maximum Newbocity has been achieved!"

  4. #4
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,424

    Re: List question

    set the listbox's .usetabstops property to true + then seperate the 3 columns with vbTab as you add each item to the listbox.

  5. #5
    Still learning kebo's Avatar
    Join Date
    Apr 2004
    Location
    Gardnerville,nv
    Posts
    3,762

    Re: List question

    Quote Originally Posted by Bigbearjeff
    Just temporarily storing data in my code. I don't want to setup up three different lists. I was hoping to have one list with three elements per row.
    In that case you could create a data Structure to hold one instance of data, then create a List of data structures. Something like this....

    vb Code:
    1. Dim MyDataList As New List(Of MyData)
    2.  
    3.     Private Structure MyData
    4.         Public OldName As String
    5.         Public NewName As String
    6.         Public Dayt As Date
    7.     End Structure

    hth
    kevin
    Process control doesn't give you good quality, it gives you consistent quality.
    Good quality comes from consistently doing the right things.

    Vague general questions have vague general answers.
    A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.

    ______________________________
    Last edited by kebo : Now. Reason: superfluous typo's

  6. #6
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,424

    Re: List question

    vb Code:
    1. private structure columns
    2.     dim OldName as string
    3.     dim New Name as string
    4.     dim Date as date
    5. end structure
    6.  
    7. dim list as new list(of columns)

    edit: you beat me....

  7. #7

    Thread Starter
    Member
    Join Date
    May 2008
    Location
    Lexington, KY
    Posts
    59

    Re: List question

    Excellent. Thanks guys. I really appreciate it. It was one of those things I knew I had seen done before, but just could not remember it.

    Cheers!
    Jeff
    "Maximum Newbocity has been achieved!"

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