[EXCEL] Updating a SQL Query in Excel after receiving user inputs
I have an SQL query in an Excel file, however, that query runs off specific dates to reduce the total lines produced. If I need to adjust the start and end dates, I currently need to update the dates in the query, which requires opening the Excel connection, go into the "source", update the query, and then allow the query to refresh.
Others trying to make use of this Excel file are not as savvy and would not know how to do the above steps. The goal is to have a popup for the Start and End dates, and then using those inputs, update the SQL query in the source, and then refresh.
I have *very* limited VBA knowledge and below is the best I was able to create using ChatGPT: https://pastebin.com/pGKucD4x
The problem I'm facing is that the above code produces errors for either Syntax error, or for too many continuations. I've tried to condense the code to allow fewer lines within the updated SQL query as much as possible, but stepping through the VBA, I seem to run into the Syntax error even on the very first step.
I'm looking for any guidance on how to approach my ultimate goal.