+ Reply to Thread
Results 1 to 5 of 5

ComboBox values source being changed based on another combobox selection in a UserForm

  1. #1
    Registered User
    Join Date
    11-19-2015
    Location
    Ohio
    MS-Off Ver
    2010
    Posts
    7

    ComboBox values source being changed based on another combobox selection in a UserForm

    I am in the midst of creating a UserForm in order to assist in adding daily bank transactions. I have two comboboxes on this userform (Category & Sub-Category) and I want to have the subcategories values populate to reflect the selected category. I've attached the file that I'm working with.

    I have defined names for the following:

    BudgetCategories ='Monthly Budget'!$AA$76:$AA$85

    BudgetSubCategories ='Monthly Budget'!$B$8:$B$12,'Monthly Budget'!$B$17:$B$26,'Monthly Budget'!$B$29:$B$38,'Monthly Budget'!$B$41:$B$50,'Monthly Budget'!$B$53:$B$62,'Monthly Budget'!$B$65:$B$74,'Monthly Budget'!$B$77:$B$86,'Monthly Budget'!$B$89:$B$98,'Monthly Budget'!$B$101:$B$110,'Monthly Budget'!$B$113:$B$122,'Monthly Budget'!$B$125:$B$134


    After all of the data is filled out completely in the UserForm, I want it to transfer the data to Sheet1 ("Daily Ledger") Starting at cell B6:G6 (*under the appropriate columns). Also, each new transaction should transfer the new data to then next empty row time after time whether hitting the "OK" or "Another Transaction".

    I look forward to hearing some of the best wisdom out there.

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    11,402

    Re: ComboBox values source being changed based on another combobox selection in a UserForm

    create new named ranges:
    Please Login or Register  to view this content.

    Populate the subcatcombobox based on category:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by protonLeah; 02-04-2016 at 10:29 PM.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    11-19-2015
    Location
    Ohio
    MS-Off Ver
    2010
    Posts
    7

    Re: ComboBox values source being changed based on another combobox selection in a UserForm

    This code does exactly what I was hoping, thank you for your assistance. However, I noticed that if I change the main category name on the worksheet the UserForm didn't work correctly. Is there a way have this list be populate the same way but have the ability for someone to rename the main category and sub category names?

    i.e. Change cell 'Monthly Budget'!$B$16 from "Housing" to "Home", "House", etc. (*giving the user freedom of customizing titles applicable to them).

  4. #4
    Registered User
    Join Date
    11-19-2015
    Location
    Ohio
    MS-Off Ver
    2010
    Posts
    7

    Re: ComboBox values source being changed based on another combobox selection in a UserForm

    Also, any thoughts on how to control where the UserForm data is transfer to. I would like the data selected in the UserForm to be transferred on Sheet 1 starting in cells B6:G6 (under the appropriate columns), then each new data entry should transfer to the next empty row below (i.e. $B7:$G7, $B8:$G8, and so on).

    Help here would also be greatly appreciated!
    Last edited by stephenanderson; 02-05-2016 at 11:43 AM. Reason: Duplicate Post

  5. #5
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    11,402

    Re: ComboBox values source being changed based on another combobox selection in a UserForm

    Quote Originally Posted by stephenanderson View Post
    Also, any thoughts on how to control where the UserForm data is transfer to. I would like the data selected in the UserForm to be transferred on Sheet 1 starting in cells B6:G6
    Please Login or Register  to view this content.

+ 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] Code required to Auto Populate 3rd Combobox based on 02nd Combobox Selection
    By bimmy80 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-14-2015, 03:56 AM
  2. Calculating/adding userform textbox values based on combobox selection and display to cell
    By SpreadsheetGirl in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-04-2015, 08:57 AM
  3. [SOLVED] Userform textbox value based on combobox selection
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-17-2014, 11:56 AM
  4. Userform Combobox to populate based on selection in another combobox
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-14-2014, 03:34 PM
  5. [SOLVED] Make combobox list options dependant on selection in another combobox within a userform
    By Vladimir_Dobvchenko in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-23-2013, 05:30 AM
  6. [SOLVED] Changed userform combobox to listbox, unable to get userform to retrieve datasheet values
    By dragonabsurdum in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-29-2013, 01:38 PM
  7. Populating a userform based on a combobox selection
    By blindzero678 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-22-2010, 03:37 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