-
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.
[vba]
Private Sub Owner_afterupdate()
Sheets("savedwork").Activate
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
[/vba]
-
(The Combobox's are on a userform)
-
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
-
Forum Rules