Hi Guys
I'm trying to build a VBA program in Excel 2007.
I have a SQL script pasted into sheet 1, and as part of that script (it's over 500 rows) there are parameters like ${Report_date}$, ${Month}$ etc, and I was wondering how I could pass this entire script through to the database (I have the database connection sorted).
e.g
Select * from Northwind
Where period_date = ${Report_Date}$
The above will be sitting in Cell reference A1 & A2.
How could I pass that via VBA? and have the parameter recognized as the date?
Hope someone can help.
Bookmarks