I am running this code to import from about 20 different databases. It works fine on all but 2!! This is the debug error that I get.
Run Time error '-214767259 (80004005)'
Method 'CopyFromRecordset' of Object 'Range' failed
And here is the code that I am running, I checked the database name, the file path and the query name and they are all correct, so I am at a loss as to what caused this to only go wrong on 2!
Edit:
It is also the exact same query from the other databases (of course just pulling from a different table) and this query will run w/o issues, if I open the database and run it, but for some reason the DAO just isn't taking or something like that. Also, the workbook has 2 sheets so that is not causing the issue either.
Bookmarks