I am working on a VBA script that pulls a date range from Access, then filters the data and creates a chart based on the filtered data. The filtered data will go to a separate sheet on which the chart will retrieve its data. I can get data from Access using an SQL statement, but my AutoFilter in Excel is wrong. Here is what I have ...
Sheet3.Range("F4:F500").AutoFilter(, "Riveter 01").Copy Destination:=Sheet2.Range("A5")
It gives a user-defined or object oriented error, and I cannot understand why. Is this correct or is there an easier way?
Thanks!
PS: This filter will be with 22 unique machines, so I planned to start a cycle for each machine. If this is not the fastest or the correct way, let me know.
Grant source share