I have the following code in MS Access. And I think something is getting weird defining between Access and Excel (I am looping through a subform, using the variable as a criteria in a filter on tables, and then pasting the table into excel, where I am making charts.) So I have no problem pasting values into excel, but When I try formatting it, I run into trouble. So, this code was actually working before, and I added some variables (See the first 4) to count the rows to select as the data source for the chart. Now, I am getting a run time error 1004 when arriving at the highlighted line. Please provide some feedback. Thanks!
VBA.PNG
Bookmarks