Consulting

Results 1 to 3 of 3

Thread: Set Columns Names in ListBoxes

  1. #1
    VBAX Contributor D_Marcel's Avatar
    Joined
    Feb 2012
    Location
    Tokyo
    Posts
    117
    Location

    Set Columns Names in ListBoxes

    Guys,
    Can you please help me with this issue?
    I'm trying to create a multicolumn ListBox and using the RowSource property to insert the values, but....

    ScreenHunter_03 Sep. 26 11.14.jpg

    Why the first row doesn't appear as header? This is so frustrating.

    [VBA]Private Sub UserForm_Initialize()
    Me.ListBox1.ColumnHeads = True
    Me.ListBox1.MultiSelect = fmMultiSelectMulti
    Me.ListBox1.ListStyle = fmListStyleOption
    Me.ListBox1.ColumnCount = 3
    Me.ListBox1.RowSource = Plan11.Range(Cells(1, 1), Cells(11, 3)).Address
    End Sub[/VBA]

    Thanks for any help!

    Douglas Marcel
    Last edited by D_Marcel; 09-26-2017 at 07:28 AM.
    "The only good is knowledge and the only evil is ignorance". Socrates

  2. #2
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,728
    Location
    Try starting at the second row


    Me.ListBox1.RowSource = Plan11.Range(Cells(2, 1), Cells(11, 3)).Address
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  3. #3
    VBAX Contributor D_Marcel's Avatar
    Joined
    Feb 2012
    Location
    Tokyo
    Posts
    117
    Location
    Solved!
    Thanks @Paul

    Regards,
    "The only good is knowledge and the only evil is ignorance". Socrates

Posting Permissions

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