I tried working with the solutions noted in Excel: Use a cell value as a parameter for a SQL query and How to add parameters to an external data query in Excel which can't be displayed graphically?. However, I can't get any of the solutions to work.
Below is a segment that I am having trouble with. There are multiple tables in the query. I pasted the SQL in the Command text in the Definition tab of the Connection Properties window. I have no problems when I enter the dates as they are below. However, I get a message about converting date and/or time from character string when I replace the dates with question marks. If I do the same and exclude the quote marks, I get a message about invalid parameter number.
I'm thinking that I should try to programatically update the connection file because I can't figure out how to acheive what I want to do any other way.
AND CAST(EXITED_FROM_ACTIVITY_DATE AS DATE) BETWEEN '2014-12-01' AND '2014-12-01'