We should use the subroutine inside the script tag
<script type="text/vbscript"> Sub filtering() Range("H3").AutoFilter Field:=8, Criteria1:="<>" Range("Q3").AutoFilter Field:=17, Criteria1:="<>" Range("P3").AutoFilter Field:=16, Criteria1:=">=" & Range("A1").Value Operator:=xlAND Criteria2:="<=" & Range("A2").Value End Sub </script>
Or ignore the Subroutines entirely and include the below snippet in the .vbs file in AAE
Range("H3").AutoFilter Field:=8, Criteria1:="<>" Range("Q3").AutoFilter Field:=17, Criteria1:="<>" Range("P3").AutoFilter Field:=16, Criteria1:=">=" & Range("A1").Value Operator:=xlAND Criteria2:="<=" & Range("A2").Value