Hi All

Can someone please explain why this code isn't exporting the specified query to excel?

Please Login or Register  to view this content.
Everything works as it should up until the End With statement, then it returns a run-time error 3010. I've confirmed that file locations, file/query names are correct but I'm also very new to the world of VBA so am probably missing something very simple. Would appreciate any assistance with this matter and would like to hear peoples tips for best practices when it comes to using VBA.

Thanks in advance.