Results 1 to 4 of 4

Thread: Multi column list box [Resolved]

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2005
    Location
    Australia
    Posts
    46

    Resolved Multi column list box [Resolved]

    Hello All,

    My understanding of VBA forms is that a list box can only contain one column of data. Is it possible to create a list box that has 5 or five columns of data, but each row is still a single selectable item.

    Does anyone know who to do this.
    Last edited by Pearso; Jun 20th, 2005 at 07:29 PM.

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: Multi column list box

    Access? or userforms in excel/word?

    Access you can. On the properties sheet>Format tab column count, and column widths. Also a column heads. Pick what you want there.
    Same for combo and list boxes. If the column width is 0 then that column is hidden yet still available to be used.

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 2005
    Location
    Australia
    Posts
    46

    Re: Multi column list box

    I would like to do it in Excel what i would like to do is make clumns A-C appear on a user form.

    I'm looking that the listbox properties. there is BoundColumn, columnCount, Columnwiths and Columnheads. Which one of these does what? And how do i set them up.

    Thanks

  4. #4
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: Multi column list box

    Attached is a test filling of a list box.
    You need to open the form via the immediates window : Tools>Macro>VB Editor - Ctrl+G - ufrm(ctrl+space).open vbmodeless
    Then flick back to excel sheet.
    There should be a form there, click on refresh and it should pull the cells data into the list box.

    Grab what you need from it. This is only one way to do this
    Attached Files Attached Files

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

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