I am hoping that you Guys can help me once again. I followed the link to Ken Snell's automation with Excel and used: Write Data From a Recordset into an EXCEL Worksheet using Automation (VBA)
Of course I had to change a few things to get it to work for my application but ran into a snag. In my query for the table data I wish to export I have a variable linked to a form. When I try to run the query using that set of instructions I get the dreaded "Runtime 3061" error. If I hard code the variable it runs fine. Is there a way to be able to pass the variable into this code so that it runs?
Thanks for all of your efforts