I've created a basic macro that pulls data from SQL sever into excel.
The connection string and and query work fine but I was wondering if it is possible to replace the query embedded within the macro to call a .txt or .sql file and use the text within the file as the query?
so instead of .Open "SELECT * FROM Authors" I would have a link to the text file and use the text contained within it as the query
Any help or pointers in the right direction will be much appreciated.
Bookmarks