+ Reply to Thread
Results 1 to 5 of 5

How to use multi-column ListBox?

  1. #1
    Registered User
    Join Date
    12-09-2008
    Location
    Hertfordshire, England
    Posts
    12

    How to use multi-column ListBox?

    Hi,

    I am trying to use a ListBox with multiple columns. I have set the properties so that columncount is 4 and columnheads is true and I can see the four distinct columns when the code is run. However, I can only seem to add data into the first column. I have tried changing the bound column or textcolumn but when I use AddItem, it always puts data in the first column.

    Can anyone give me an example of how to populate all the columns in a ListBox please?

    Thanks

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Where are you populating from? is the source on a sheet?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    12-09-2008
    Location
    Hertfordshire, England
    Posts
    12
    It will eventually use an ADO Recordset but for test purposes I am just trying to hard-coded text to the columns. eg. ListBox1.AddItem "Hello".

    How would I put "Hello" in the first column and "Goodbye" in the second one?

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Like this
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    12-09-2008
    Location
    Hertfordshire, England
    Posts
    12

    Re: How to use multi-column ListBox?

    Great, that worked a charm! Thanks for your help.
    Core 2 Quad Q6600 o/c @ 2.9GHz, 4Gb DDR2 1066MHz, HD5770 1Gb 850MHz, 2 x 750Gb HDD (RAID 0), Benq G2222HDL 22" 1920 x 1080 LED, Win7 Ultimate

    Toshiba Satellite A665-11M, 16" 1366 x 768, i7 720QM 1.6GHz, 4Gb DDR2 1066MHz, GT330M 1Gb, 500Gb HDD, Win7 Home Premium

    Amiga 1200, 3.1 ROM, Blizzard 1230-IV 68030 50MHz CPU, 68882 FPU, 16Mb, 4Gb CF-based HDD, Custom IDE CDROM Drive, Indivision AGA Scandoubler, Custom VGA output, CWB 3.1 ADVSP, Benq G2222HDL 22" 1920 x 1080 LED (720p resolution)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1