+ Reply to Thread
Results 1 to 4 of 4

Displaying the header on a userform Listbox

  1. #1
    Forum Contributor
    Join Date
    09-02-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    368

    Displaying the header on a userform Listbox

    Hello,

    I'm trying to populate a ListBox from a data from a worksheet based on a criteria. Whilst I managed to display the intended result, that is the list of corresponding criteria, I cannot manage to display the header of the data and I'm not sure how should I rewrite the code to include the header.

    The header is on the Row 7 and the data starts from Row 8.

    Do I have to look at the exercise from a different angle or is there any way I can display the header in teh result by amending/updating the code below?

    Thank you as always for your help and contribution.

    Below is the code used:

    Please Login or Register  to view this content.

  2. #2
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,302

    Re: Displaying the header on a userform Listbox

    The add headers apparently only works with the 'rowsource' method of loading the listbox.
    attached file to show.
    torachan.
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    1,001

    Re: Displaying the header on a userform Listbox

    Another way is to insert another listbox and then populate the header into it.
    You may need to set enabled property to false & also adjust some other properties.
    Here's an example:

  4. #4
    Forum Contributor
    Join Date
    09-02-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    368

    Re: Displaying the header on a userform Listbox

    Hello everyone,
    Thank you very much for your contribution and help.
    I sort of used both recommendations but doing the search outside the userform and pasting the result into the listbox. It worked very well.
    Thank you very much.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] How to make Userform Listbox Header Non-selectable
    By ChrisHook in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-04-2019, 06:42 PM
  2. [SOLVED] Displaying filtered multicolumn table in userform listbox
    By AndyE in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-31-2018, 09:58 AM
  3. [SOLVED] if anything in listbox select first item, if listbox empty do nothing (listbox in userform
    By mcdermott2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-17-2015, 12:49 PM
  4. [SOLVED] copy contents of userform listbox to another userform listbox
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-04-2014, 11:39 AM
  5. Transfer Data From One Userform Listbox to Another Userform Listbox with 11 columns
    By sparkoft in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-18-2013, 10:54 AM
  6. Listbox to Listbox, no duplicates & submitting same UserForm data for each Listbox entry.
    By jamieswift1977 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-18-2012, 12:18 PM
  7. Problem displaying single record in userform listbox from recordset
    By carpking in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-24-2009, 03:24 AM

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