How to add data to "ColumnHeads" in Excel VB ListBox ?
Manage your personal finances in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: How to add data to "ColumnHeads" in Excel VB ListBox ?

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Location
    India
    Posts
    50
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Hi all,

    I have a ListBox on a UserForm in an Excel VB Project.
    One of the properties of ListBox is "ColumnHeads". When I make this 'True', add data to the list and run, I get a box in the first row of the list.

    As expected this box remains even when I scroll down the list.

    But I am not able add any data to this first row. Even the first data I add (to the list) is displayed from the second row.

    Can someone help me to add data to the "ColumnHead" ?

    Note : I am using
    "MicroSoft Forms 2.0 ListBox", (MF20.DLL)
    not the "ListView"

    Thanks in Advance
    - sam

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Bogota, Colombia
    Posts
    11,959
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I've only used this option using "real" ranges from Excel, not adding the items on the fly... I don't know if you could add titles on the fly....
    Regards,

    Juan Pablo González
    http://www.juanpg.com

  3. #3
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi sam

    To have ColumnHeads included you must exclude your firt row in the RowSource Property. For example if your data table is "A1:K1000" you MUST use: "A2:K1000" to have row 1 as your ColumnHeads.



  4. #4
    Board Regular
    Join Date
    Mar 2002
    Location
    India
    Posts
    50
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Juan Pablo & Dave Hawley,

    This is GREAT....

    I am amazed by the speed...

    Thank you very much
    - sam

  5. #5
    New Member
    Join Date
    Jul 2011
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: How to add data to "ColumnHeads" in Excel VB ListBox ?

      
    Thanks, I learned a simple solution after an intense search on the www. Thank You!

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com