Hello,
I'm fairly new to the world of VBA and I'm struggling with a current macro. The macro was originally written in using VBA in Excel 2003, however I want to start using in Excel 2010. I thought that it would work without making any changes, however this has not been the case and I've come to a point where I don't know what else to do. Here's the code:
From stepping through the macro and surfing the net, I've come to narrow down the problem to the indicated line. As far as I can tell, the error is happening becuase my query inputs are either invalid or malformed. When using Excel 2003, the program works fine; but when using Excel 2010 I get the following error:
Run-time error '-2147217842(80040e4e)': Method 'Refresh' of object '_QueryTable' failed.
As far as I can tell, my driver is able to connect me to the appropiate database (though I may be wrong). Does anyone have any feedback that could help me? It would be greatly appreciated.
Many thanks in advance,
DJ05
Bookmarks