• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

searchable combobox affecting values of other combobox

martinxls

New Member
hi there...I want to ask, is it possible if I have 2 searchable combobox, if I choose a value at the 1st combobox, the 2nd combobox will automatically choose a value too (or vice versa). for example:
the 1st combobox is NAME
the 2nd combobox is ID NUMBER
whenever I choose one of the combobox, the other combobox will respond. could you post the script? thanks
 
Hi, what could exactly means such « searchable combobox » ?!​
Anybody won't give it a try without an elaboration at the level any Excel forum expects for … As guessing can't be coding …​
Anyway with a standard Form ComboBox within its VBA Change event …​
 
Dear Marc L
searchable combobox means searchable droplist..I just type part of word, then the droplist will give suggestions all the list that contains that part of word I typed.
sorry I didnt attached the excel file earlier because I created this thread using my phone.

Im attaching the file now.
this is what I mean with searchable droplist, for example I only wrote "JSC" then the list will show every part containing word "JSC"
83011

I make a script, whenever I choose 1 product at the 1st droplist, the 2nd droplist will automatically responding to the 1st droplist
Code:
Private Sub ComboBox1_Change()

ComboBox1.ListFillRange = "speclist"
'ComboBox1.DropDown

makervalue = Range("E5").Value
    If Not ComboBox1.Text = "" Then
        ComboBox2.Text = makervalue
    Else
    End If

End Sub

Private Sub ComboBox2_Change()

ComboBox2.ListFillRange = "makerlist"

'ComboBox2.DropDown

End Sub

but sometimes I get this kind of error :
83015
I dont quite understand what's wrong
 

Attachments

  • searchable combobox.xlsm
    71.2 KB · Views: 4
As you use a searchable ComboBox modify its content via its ListIndex property like ComboBox2.ListIndex = 0 …​
 
Back
Top