Since you have the
criteria range in its own 'white space'', you can use
CurrentRegion to determine its extent, so you only need one line (you don't need the
Dims because the code is inside the sheet's own code-module so all unqualified ranges refer definitively to that same sheet):
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Range("B12:C24").AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:=Range("B3").CurrentRegion, Unique:=False
End Sub