ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to: Create Dependent Drop Down in a Form (https://www.excelbanter.com/excel-programming/432628-how-create-dependent-drop-down-form.html)

Benjamin

How to: Create Dependent Drop Down in a Form
 
I've got two combo boxes in a form.
One is the "Master" and the second is the dependent.
I can do this in a regular cell with validation drop-downs.
How do I create the dependent in the userform?

-----------------------------------------------------------
<<RANGES

Master Range =LISTS!$A$2:INDEX(LISTS!$A:$A,COUNTA(LISTS!$A:$A))
UseList Range =INDEX(ValData,1,MATCH('Data Entry'!B75,LISTS!$1:$1,0)):
INDEX(ValData,Counter,MATCH('Data Entry'!B75,LISTS!$1:$1,0))

-----------------------------------------
<<VBA
<<Current UserForm Initialize code:

Private Sub UserForm_Initialize()


cboDiscipline = "--Select Here First--"
cboDescription = "--Select Here Second--"

With Worksheets("LISTS")
Me.cboDiscipline.List _
= .Range("Master").Value
End With




End Sub

ryguy7272

How to: Create Dependent Drop Down in a Form
 
Will these work for you?
http://www.contextures.com/xldataval02.html
http://www.contextures.com/xlDataVal13.html

HTH,
Ryan---
--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Benjamin" wrote:

I've got two combo boxes in a form.
One is the "Master" and the second is the dependent.
I can do this in a regular cell with validation drop-downs.
How do I create the dependent in the userform?

-----------------------------------------------------------
<<RANGES

Master Range =LISTS!$A$2:INDEX(LISTS!$A:$A,COUNTA(LISTS!$A:$A))
UseList Range =INDEX(ValData,1,MATCH('Data Entry'!B75,LISTS!$1:$1,0)):
INDEX(ValData,Counter,MATCH('Data Entry'!B75,LISTS!$1:$1,0))

-----------------------------------------
<<VBA
<<Current UserForm Initialize code:

Private Sub UserForm_Initialize()


cboDiscipline = "--Select Here First--"
cboDescription = "--Select Here Second--"

With Worksheets("LISTS")
Me.cboDiscipline.List _
= .Range("Master").Value
End With




End Sub


Benjamin

How to: Create Dependent Drop Down in a Form
 
No I need to access combo box 1 's value
and allow that to fit into the combobox two's selection options that use the
..additem

"ryguy7272" wrote:

Will these work for you?
http://www.contextures.com/xldataval02.html
http://www.contextures.com/xlDataVal13.html

HTH,
Ryan---
--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Benjamin" wrote:

I've got two combo boxes in a form.
One is the "Master" and the second is the dependent.
I can do this in a regular cell with validation drop-downs.
How do I create the dependent in the userform?

-----------------------------------------------------------
<<RANGES

Master Range =LISTS!$A$2:INDEX(LISTS!$A:$A,COUNTA(LISTS!$A:$A))
UseList Range =INDEX(ValData,1,MATCH('Data Entry'!B75,LISTS!$1:$1,0)):
INDEX(ValData,Counter,MATCH('Data Entry'!B75,LISTS!$1:$1,0))

-----------------------------------------
<<VBA
<<Current UserForm Initialize code:

Private Sub UserForm_Initialize()


cboDiscipline = "--Select Here First--"
cboDescription = "--Select Here Second--"

With Worksheets("LISTS")
Me.cboDiscipline.List _
= .Range("Master").Value
End With




End Sub



All times are GMT +1. The time now is 06:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com