+ Reply to Thread
Results 1 to 2 of 2

Populating combobox dependent on another combobox

  1. #1
    Registered User
    Join Date
    03-05-2013
    Location
    Wichita, KS, USA
    MS-Off Ver
    Excel 2010
    Posts
    17

    Populating combobox dependent on another combobox

    Hi everyone...I trying to develope a userform in Excel 2010, that has 3 comboboxes dependent on each other. What I am having trouble with is populating the 3rd combobox with the data from the spreadsheet worksheet "Chassis Specs" column "B" which is dependent on column "A" which is the result of combobox 2.

    Here's what I have for the code for the 2nd combobox that should populate the 3rd combobox:

    Private Sub ComboBoxChassisSubType_Change()

    Dim CRange As Range, c As Long, v

    With Sheets("Chassis Specs")
    c = Application.Match(ComboBoxChassisType.Value, .Range("A2:A19"), 0) + 1
    v = Worksheets("Chassis Specs").Range("A2:A19").End(xlToRight).Column
    If IsArray(v) Then
    ComboBoxChassisSpec.List = v
    Else
    ComboBoxChassisSpec.AddItem v
    End If
    End With

    If Not ComboBoxChassisType = "" Then
    ComboBoxChassisSpec.Enabled = True: ComboBoxChassisSpec.BackColor = &HFFFF&
    End If

    End Sub

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Populating combobox dependent on another combobox

    Please use code tags when posting code.

    Instead of this
    Please Login or Register  to view this content.
    I think you want
    Please Login or Register  to view this content.
    David
    (*) Reputation points appreciated.

  3. #3
    Registered User
    Join Date
    03-05-2013
    Location
    Wichita, KS, USA
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Populating combobox dependent on another combobox

    OK, I'm getinng a ruN-time error '13', type mismatch, when I try and run my code. Here's my complete workbook:
    Attached Files Attached Files
    Last edited by JChaney17; 07-24-2014 at 02:01 PM.

+ 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. Populating Userform ComboBox Using Items from Content Control Combobox
    By anarxo in forum Word Programming / VBA / Macros
    Replies: 2
    Last Post: 01-17-2014, 01:00 PM
  2. Populating combobox 2 with items that match criteria from combobox 1
    By kuraitori in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 12-13-2013, 03:00 AM
  3. [SOLVED] VBA ComboBox Value Dependent on Conditional Value from Another ComboBox
    By Brianandstewie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-04-2013, 02:35 AM
  4. Removing Duplicates from ComboBox and Populating one combobox based on another
    By kbmtech in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-27-2010, 11:17 PM
  5. Populating the list in a combobox based off the value chosen in another combobox
    By Mervil in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-21-2010, 11:50 AM

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