+ Reply to Thread
Results 1 to 3 of 3

Userform - selecting data for combobox 2 basedon slection in combobox 1

  1. #1
    Forum Contributor
    Join Date
    12-14-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    106

    Userform - selecting data for combobox 2 basedon slection in combobox 1

    Hi

    I have a workbook with 4 worksheets:- input sheet, clematis, climbers, evergreens. In clem clim and ever sheets there is a list of varieties that fit within that categary.

    I have a userform on input sheet with two listboxes in it. The first listbox is populated with clematis, climber, evergreen. If I select clematis from the listbox I want listbox 2 to populate the numerous varieties from column c in the clematis sheet, and if select evergreen populate varieties from column c in the evergreen sheet etc etc.

    I am not really sure what approach to take. I wasn't sure if an if else then approach was correct and if it was what the code would be or whether this was very sloppy and a better method exists.

    Rather inexperienced but enthusiastic to learn.

    Thanks in advance

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Userform - selecting data for combobox 2 basedon slection in combobox 1

    chrisjames25,

    I can't really give you a more specific answer without seeing your workbook, but hopefully this gets you started in the right direction.
    Assuming the first control is a combobox named cboCategory and the second control is a combobox named cboVariety, this code should be close to what you're looking for:
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Contributor
    Join Date
    12-14-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    106

    Re: Userform - selecting data for combobox 2 basedon slection in combobox 1

    Thanks for input tiger avatar.

    I can follow ur logic but sadly will have to wait to test till tomorrow. Wife will kill me if do anymore work tonight. Will report early doors tomorrow. Cheers

+ 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] send data from userform combobox to userform combobox
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-18-2013, 04:47 PM
  2. [SOLVED] VBA Userform ComboBox: Content of ComboBox based off of Conditional Statement
    By Brianandstewie in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-16-2013, 03:00 PM
  3. [SOLVED] Excel Userform: Populate other controls (i.e. textbox & combobox) based on combobox select
    By MileHigh_PhD in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-22-2013, 04:50 PM
  4. Replies: 17
    Last Post: 10-14-2012, 11:15 AM
  5. Combobox on Userform not selecting correct data
    By frostie77 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-20-2010, 05:15 PM

Tags for this Thread

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