Results 1 to 6 of 6

How to add Values to ListBox.ColumnHeads

Threaded View

herbie226 How to add Values to... 04-24-2018, 04:35 PM
dOOb Re: How to add Values to... 04-24-2018, 04:45 PM
herbie226 Re: How to add Values to... 04-24-2018, 05:11 PM
Norie Re: How to add Values to... 04-25-2018, 05:06 AM
dOOb Re: How to add Values to... 04-25-2018, 05:18 AM
herbie226 Re: How to add Values to... 04-25-2018, 10:24 AM
  1. #5
    Registered User
    Join Date
    11-19-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    2016
    Posts
    57

    Re: How to add Values to ListBox.ColumnHeads

    Assuming your data is in range A1:D4 where A1:D1 are headers and your ListBox has 4 columns, then to display these headers in your ListBox the way you want, the RowSource property of the ListBox should point to range "A2:D4" and the ColumnHeads property should be set to True.

    That grid at the very top of your ListBox gets populated with headers only if you are are populating your ListBox from range/table on worksheet. It does not work if you are filling your ListBox in from array or adding items to it one by one.

    Possible workarounds:
    1. Collect your ListBox items in a worksheet, edit headers if needed, then load the ListBox from worksheet.
    2. Collect your ListBox items in array, when ready, dump the array into worksheet, adjust headers if needed and load the ListBox from worksheet.
    3. On UserForm, add Labels/TextBoxes above ListBox.
    4. On UserForm, add separate ListBox above the existing one and load it with headers from worksheet.
    Last edited by dOOb; 04-25-2018 at 05:27 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Show unique values in listbox and activate related cell if i select value in Listbox
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-22-2018, 06:54 AM
  2. Columnheads does not display in listbox!
    By hoabattuvn_tt in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-09-2015, 07:07 AM
  3. [SOLVED] How do I populate a listbox with a list excluding values found in another listbox?
    By Hokiefan00 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-27-2014, 01:47 PM
  4. How to use ColumnHeads in a ListBox?
    By aspicuelta in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-13-2010, 01:53 PM
  5. [SOLVED] userform listbox columnheads
    By borg in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 06-02-2006, 10:55 AM
  6. How to add data to ColumnHeads of Listbox
    By lehainam in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-03-2005, 08:05 AM
  7. VBA ColumnHeads Property for ComboBox
    By VBA Dabbler in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-28-2005, 03:06 PM

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