PDA

View Full Version : Userform- Populating Dependent List Help



Sethuraman29
08-06-2017, 04:56 PM
Hi Support,


Please find the attached Workbook. I've a Excel file which has 4 sheets. Main Sheet "Summary" is the main page, which has a User-form.

My Requirement is, Employee ID has to be picked from the " User" Sheet. Once we select the Employee ID, automatically Employee name needs to be populated.
Same Way, Software name has to be picked from the " SoftwareList" Sheet.Once we select the Software Name, automatically Manufacturer name and Version needs to be populated in the respective Combo Box.

You can refer the source sheet for lookup

1)Summary
2)Requirement
3)User
4)SoftwareList

Kindly someone look at the attachment and help me to overcome this. It will be a great help.... Attached the Excel File

mana
08-07-2017, 03:59 AM
Private Sub UserForm_Initialize()
Dim r As Range

Set r = Sheets("User").Cells(1).CurrentRegion
Set r = Intersect(r, r.Offset(1))

ComboBox1.List = r.Value

End Sub


Private Sub ComboBox1_Change()

With ComboBox1
If .ListIndex = -1 Then
TextBox2.Value = ""
Else
TextBox2.Value = .List(.ListIndex, 1)
End If
End With

End Sub

Sethuraman29
08-07-2017, 05:25 PM
Thank you.. It is great and timely help