Exporting into excel and running a macro, a macro error shows up:
microsoft visual basic runtime error 1004 select method of worksheet class failed
But, when running the macro manually the error is not there.
Multiple statements in the query to export:
Create table...;Delete ...; ... ;Select ...;