The Amsterdam Excel Summit

Results 1 to 3 of 3

Thread: Solved: Populating Combobox with Filtered Data

  1. #1

    Solved: Populating Combobox with Filtered Data

    I am attempting to populate a second combobox with information that has been filtered from a selected value within the first combobox.

    So far... I've been unsuccessful.

    Private Sub Owner_afterupdate()
    With Range("a:a", Range("a4:a" & Rows.Count).End(xlUp))
    .AutoFilter 1, Owner.Value
    End With
    Dim LastRow As Long
    With Worksheets("savedwork")
    LastRow = .Range("B" & Rows.Count).End(xlUp).Row

    FacilityID.RowSource = .Range("B2:B" & LastRow)
    End With

    End Sub

  2. #2
    (The Combobox's are on a userform)

  3. #3
    I got it....

    [vba] Dim cLoc As Range
    Dim ws As Worksheet
    Set ws = Worksheets("listssheet")
    On Error GoTo line1:
    For Each cLoc In ws.Range("facilityidlist")
    With Me.FacilityID
    .AddItem cLoc.Value
    End With
    Next cLoc
    line1: [/vba]

    Thanks !!

Posting Permissions

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