Consulting

Results 1 to 3 of 3

Thread: Userform- Populating Dependent List Help

  1. #1

    Userform- Populating Dependent List Help

    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
    Attached Files Attached Files

  2. #2
    VBAX Expert
    Joined
    Sep 2016
    Posts
    788
    Location
    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

  3. #3

    Thank you.. It is great and timely help

    Thank you.. It is great and timely help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •