title: Autofilter Excel with VBA
body: <p>I would like to open Excel from Access and apply filters to a sheet.
  Below is my code:</p>
  
  <pre><code>Dim s as String
  Set oApp = CreateObject("Excel.Application")
  oApp.Wworkbooks.Open FileName:="dudel.xlsm"
  oApp.Visible = True
  s = "AB"
  With oApp
          .Rows("2:2").Select
          .Selection.AutoFilter
          .ActiveSheet.Range("$A$2:$D$9000").AutoFilter Field:=3, Criteria1:= _ 
               Array(s, "E", "="), Operator:=xlFilterValues
          .Range("A3").Select 
  End With
  </code></pre>
  
  <p>When I ran the code, I got this error:</p>
  
  <blockquote>
    <p>runt time error 1004 Autofilter methond of range class failed</p>
  </blockquote>
  
  <p>Can anyone see why?</p>