I have a UserForm with 2 ComboBoxs.
I would like ComboBox B's results to be filtered based off the selection in ComboBox A.
Attached is my Workbook. The UserForm in question is "AddQtyFrm"
After the ComboBox "POlst" has its selection made the ComboBox "PartLst" will be filtered to show results related to "POlst" value.
Current Code for "AddQtyFrm"
Code
Private Sub CancelBtn_Click()
AddQtyFrm.Hide
Unload AddQtyFrm
End Sub
Private Sub OkBtn_Click()
'Check For Required Fields
Dim Last As Long
Last = Sheet7.Cells(Rows.Count, 13).End(xlUp).row
If QtyReceived.Value = Empty Or POLst.Value = Empty Or DateReceived.Value = Empty Or PartLst.Value = Empty Then
MsgBox "Please Make Sure to Fill in All Fields Before Saving"
Exit Sub
End If
' Worksheet Parts List is in Sheet7
With Sheet7
.ListObjects("PartsTbl").Range.AutoFilter Field:=13, Criteria1:=POLst.Value
.ListObjects("PartsTbl").Range.AutoFilter Field:=7, Criteria1:=PartLst.Value
.Range("P3:P" & Last).SpecialCells(xlCellTypeVisible).Value = QtyReceived.Value
.Range("O3:O" & Last).SpecialCells(xlCellTypeVisible).Value = DateReceived.Value
.ListObjects("PartsTbl").Range.AutoFilter Field:=13
.ListObjects("PartsTbl").Range.AutoFilter Field:=7
End With
AddQtyFrm.Hide
Unload AddQtyFrm
End Sub
Private Sub UserForm_Activate()
POLst.RowSource = "UniquePO"
PartLst.RowSource = "UniquePart"
DateReceived.Value = Format(Date, "mm/dd/yyyy")
End Sub
Display More