I would probably approach this a different way...
Regardless of approach you should revise your UF code such that the variables Module & Configuration are both declared as Public, eg:
Config UF
Public Configuration As String
Private Sub CommandButton1_Click
...
End Sub
Selection UF
Public Module As String
Private Sub CommandButton1_Click
...
End Sub
Then in your main code one approach would be:
Public Sub Delete()
Selection.Show
Config.Show
With Range(Cells(2, "A"), Cells(Rows.Count, "A").End(xlUp)).Offset(, Columns.Count - 1)
.FormulaR1C1 = "=IF(OR(RC4<>""" & Selection.Module & """,ISERR(SEARCH(""" & Config.Configuration & """,RC11))),""x"",0)"
.SpecialCells(xlCellTypeFormulas, xlTextValues).EntireRow.Delete
.Clear
End With
End Sub
Unfortunately running Auto Filters could get awkward given you would need to run twice - ie you can't apply both rules simultaneously (as I see it)
Bookmarks