title: Excel Filtering and Copying in VBA
body: <p>I'm working on a VBA script that pulls a range of dates from Access, then filters the data and creates a chart based on the filtered data.  The filtered data will be going to a separate sheet where the chart will be pulling its data from .  I can get data out of Access with a SQL statement, but my <code>AutoFilter</code> in Excel is erroring out. Here is what I have...</p>
  
  <pre><code>Sheet3.Range("F4:F500").AutoFilter(, "Riveter 01").Copy Destination:=Sheet2.Range("A5")
  </code></pre>
  
  <p>It gives an app-defined or object-defined error and I can't figure out why.  Is this the proper way or is there an easier way?</p>
  
  <p>PS:  This filter will happen with 22 unique machines so I was planning on running a loop for each machine.  If that is not the fastest or proper way please let me know.</p>