Users have a query in access and want the results of that query sent to excel for processing. In a nutshell, data from Access query “Query Imp final Data For Report1” is written to C:Imp.xls. The raw data is then copied and pasted to four tabs for processing.
In the first tab, “RDT&E Lvl 4 & 5 by FY”, I need to loop through the data and delete all rows where the data in column 2 , Level, > 5. Simple enough. I was able to do this while coding in excel but cant get it to work when controlling excel from access. Code is as below: I am getting an error message runtime 424, object requried at line shown. I have tried this various different ways but am stuck. Funny thing is this part was working yesterday as I was able to loop through the code and see the values but cant now. Reference is set to Microsoft Excel 9.0 Object Library and DAO 3.6. Any help would be appreciated.
Just to clarify, I can manipulate this in access as needed but the users want it in excel and then want me to format it via colors and other irritating items as needed, so it is off to excel I go. Help.
Long code fragment moved to attachment by HansV