Hello there,
please i need help to modify this code to autofilter form combobox dynamically, but sounds like there is a trick with my code
this filter based on as per what select from Month the "Super" combobox will be filtered, then as per what "Super" filter, the "Leader" combobox will be filtered etc...
i face a problem with "Super" combobox
please i need help to modify this code to autofilter form combobox dynamically, but sounds like there is a trick with my code
Code:
Private Sub Super_list_Change()
Dim shtDailyExport As Worksheet
Dim varMonth As Variant
Dim varsuper As Variant
Dim varTeamLeader As Variant
Dim varUserName As Variant
Set shtDailyExport = Sheets("Data ()")
varMonth = shtDailyExport.ListObjects("Table_SA_Database2").ListColumns("Month").DataBodyRange
varsuper = shtDailyExport.ListObjects("Table_SA_Database2").ListColumns("Super").DataBodyRange
varTeamLeader = shtDailyExport.ListObjects("Table_SA_Database2").ListColumns("Leader").DataBodyRange
varUserName = shtDailyExport.ListObjects("Table_SA_Database2").ListColumns("User Name").DataBodyRange
For i = 1 To UBound(varMonth)
If varMonth(i, 1) = Me.Month_list.Value And _
varsuper(i, 1) = Me.Super_list.Value And _
varTeamLeader(i, 1) = Me.Leader_list.Value And _
InStr(deb & "|", "|" & varUserName(i, 1) & "|") = 0 Then deb = deb & "|" & varUserName(i, 1)
Next i
Me.User_list.List = Split(Mid(deb, 2), "|")
Set deb = Nothing
End Sub
this filter based on as per what select from Month the "Super" combobox will be filtered, then as per what "Super" filter, the "Leader" combobox will be filtered etc...
i face a problem with "Super" combobox