+ Reply to Thread
Results 1 to 6 of 6

listbox with column headers as a specific sheet column headers

Hybrid View

  1. #1
    Forum Contributor ANDREAAS's Avatar
    Join Date
    05-06-2013
    Location
    Port Elizabeth, South Africa
    MS-Off Ver
    Excel 2007 / 2010
    Posts
    368

    listbox with column headers as a specific sheet column headers

    Hi

    i have a userform with two listboxes in them, i have set the columns in the listbox to 9 and would like to populate the column headers in the listboxes with the column header of one of the sheets
    Range("B3:J3")[
    on of my other sheets have the same column headers, but i'd like for the listbox to take the data from a specific sheet so that when i change any of the column headers in that sheet, it will change in the listbox as well next time the userform is opened.

    i have tried :
    With Me.ListBox1
    .RowSource = Range("B3:J3").Address
    End With
    ,but this gives an error, and this is where the scope of my know how ends too

    Any help with this will be greatly appreciated.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: listbox with column headers as a specific sheet column headers

    Ηι

    How do you get the data=contents in the listbox?
    are these from the same sheet that you need to add the headers?
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Contributor ANDREAAS's Avatar
    Join Date
    05-06-2013
    Location
    Port Elizabeth, South Africa
    MS-Off Ver
    Excel 2007 / 2010
    Posts
    368

    Re: listbox with column headers as a specific sheet column headers

    client search - Copy.xlsmHi

    i have not got that far yet, i posted a thread for that, but keapt adding the wrong sheet for some dilly reason.....

    see attached

  4. #4
    Forum Contributor ANDREAAS's Avatar
    Join Date
    05-06-2013
    Location
    Port Elizabeth, South Africa
    MS-Off Ver
    Excel 2007 / 2010
    Posts
    368

    Re: listbox with column headers as a specific sheet column headers

    see below link to previous post
    HTML Code: 

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: listbox with column headers as a specific sheet column headers

    i am not a vba expert so as an option i used a named range for your range which i used in rowsource of your list box.Not sure if this is what you need.
    Attached Files Attached Files

  6. #6
    Forum Contributor ANDREAAS's Avatar
    Join Date
    05-06-2013
    Location
    Port Elizabeth, South Africa
    MS-Off Ver
    Excel 2007 / 2010
    Posts
    368

    Re: listbox with column headers as a specific sheet column headers

    thank you Fotis. as said any help is greatly appreciated. now i jut need the whole est of the projects code.....

+ 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] Match value(s) in column with headers of another sheet and paste a cell value from column
    By Zoediak in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-17-2013, 11:34 AM
  2. [SOLVED] copy column headers into rows if it meets a specific criteria
    By melody10 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 09-30-2013, 06:05 AM
  3. [SOLVED] How to show column headers in listbox from access database?
    By Kiran2012 in forum Access Programming / VBA / Macros
    Replies: 4
    Last Post: 11-26-2012, 10:30 AM
  4. [SOLVED] Listbox column headers when data is collected in an array
    By evertjvr in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-12-2012, 09:44 PM
  5. Replies: 2
    Last Post: 05-09-2012, 01:30 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