+ Reply to Thread
Results 1 to 7 of 7

Dynamic Row source for Combo box on Userform.

  1. #1
    Forum Contributor excelkeechak's Avatar
    Join Date
    07-21-2008
    Location
    India.
    MS-Off Ver
    2013 /2016
    Posts
    363

    Dynamic Row source for Combo box on Userform.

    hello forum,

    i had been trying for some time about providing rowsource for a combo box on a userform.tried with the below code for updating combo box when there are values in the next column.

    Please Login or Register  to view this content.
    rngdynamic : =OFFSET(Sheet1!$A15,0,0,COUNTA(Sheet1!$A:$A),1)

    Where the rngdynamic implies the Named Range in the worksheet SHEET1 .my requirement is to update the combo box with the rowsource when there is data in the next column of the existing column...
    Please help me where i m missing the code....
    Last edited by excelkeechak; 04-15-2012 at 09:59 PM.
    THANKS
    ExcelKeechak

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Dynamic Row source for Combo box on Userform.

    How about
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor excelkeechak's Avatar
    Join Date
    07-21-2008
    Location
    India.
    MS-Off Ver
    2013 /2016
    Posts
    363

    Re: Dynamic Row source for Combo box on Userform.

    Thanks for the reply but my requirement is not fulfilled dear jindon.
    i will elaborate the problem....I had a list in column A...This will be the Rowsource for the combo on the form initially when the form is loaded.
    New lists will be added to columns daily from B, C,D, and so.on.
    i want the rowsource to be updated for the combo daily..

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Dynamic Row source for Combo box on Userform.

    You want the rowsource from different columns?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Valued Forum Contributor StevenM's Avatar
    Join Date
    03-23-2008
    Location
    New Lenox, IL USA
    MS-Off Ver
    2007
    Posts
    910

    Re: Dynamic Row source for Combo box on Userform.

    I don't understand what "A15" is about, but if you are wanting to list the last column in your sheet as a comboBox list, you might try something like this.

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor excelkeechak's Avatar
    Join Date
    07-21-2008
    Location
    India.
    MS-Off Ver
    2013 /2016
    Posts
    363

    Re: Dynamic Row source for Combo box on Userform.

    Quote Originally Posted by royUK View Post
    You want the rowsource from different columns?
    yes mr.roy

    the code should check the data in the columns,if the data exists in one of these columns say for example,i had copied some data in to column A,the same should be reflected as rowsource in Combo box,next day i had copied data into Column B,then the Rowsource changes to the columnB,like wise,the code should check the last filled column and treat it as Rowsource for the combo....

    I think mr.steven is very nearer to my requirement.i m just trying to make necessary changes for the code to work....
    Last edited by excelkeechak; 04-15-2012 at 09:56 PM.

  7. #7
    Forum Contributor excelkeechak's Avatar
    Join Date
    07-21-2008
    Location
    India.
    MS-Off Ver
    2013 /2016
    Posts
    363

    Re: Dynamic Row source for Combo box on Userform.

    WOwww..thats great thanks mr.steven..your code is working great & this is my exact requirement.thanks a lot....

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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