How to display data in the listbox column header

  • Re: How to display data in the listbox column header


    1. Get data of your choosing
    2. Display in ListBox (specifically, the header column)


    Based on your post - that's about as specific the help is going to get. Try giving an actual example of what you're trying to achieve, and at least try Google or search within this forum first before asking someone for a complete code example.


    P.S. A couple more scrolls down the page will show you the answer anyway.

  • Re: How to display data in the listbox column header


    Hi,


    Please find the below code:




    where listbox control lstDataAccess name populate the data & that where i am trying to display in column header.


    Please help.


    thanks..


    Mangai Venkata


    ______________________________________________________________________________________________________


    [COLOR="#FF0000"]Mod Edit[/COLOR]:
    Please use Code tags when you post code in a message. As you can see, Code Tags format the code making it easier to read and follow the logic. Code tags are added when ediitng a message, simply highlight the code and click the '#' button on the toolbar above the Edit box.

  • Re: How to display data in the listbox column header


    ColumnHeaders can only be displayed if the RowSource is from a Worksheet range. The ColumnHeaders will be taken from the row above the first row of the range used for RowSource. You cannot display Column Headers if the Rowsource is a RecordSet object.


    General answer only - you did not include the code for the Procedure ImpoerUserForm and I've no idea what "DataAccess" is in the following code snippet

    Code
    'refresh the listbox
        ImportUserForm 
    
    
        Me.lstDataAccess.RowSource = "DataAccess"
  • Re: How to display data in the listbox column header


    thank you for your reply & time as well...


    I was looking at this problem just now and found this solution. If your RowSource points to a range of cells, the column headings in a multi-column listbox are taken from the cells immediately above the RowSource.


    But if i choose through listbox properties as column heads it loads header but i am not able to interconnect this.

  • Re: How to display data in the listbox column header


    Quote from Mangai Venkata

    ...the column headings in a multi-column listbox are taken from the cells immediately above the RowSource


    Quote from cytop

    ColumnHeaders can only be displayed if the RowSource is from a Worksheet range ... will be taken from the row above the first row of the range used for RowSource


    Spot the difference.

  • Re: How to display data in the listbox column header


    thanks again...no differences..its the same but i am trying to use columnheads property..


    Where the problem is...data is getting displayed in the second row not in the first especially in the column header...


    i would be happy if you spot the issue whether i have to code it separately to get into the first row..


    listbox data not through rowsource in case..


    please help..

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!