Hello All,
I have a decent understanding of excel. Notwithstanding, I am still a bit of a novice when it comes to VBA.
Here is my dilemma:
In an attempt to automate a query within one of my workbooks I recorded a simple macro to run/update said query. However, there is an issue... my query was setup in a way that always requires the end user to update the date range within the query. For example, when I want to update my data for the month of August 2015 I need to update the date range to 201508, which equals August 2015 in SQL language. So by default my recorded macro has a reference to a specific date for the query update, in this case 201508. I need to be able to update this date by simply referencing a cell in my workbook (let's say cell A1 on the worksheet tab) which will be the point of reference for my macro's date range. So if someone wants to see this information for September 2015 they can type in 201509 in a cell and run the macro for a quick update. I haven't decide on whether the macro will run when a date range is enter in the cell or if there will be a button. Regardless, any one have any ideas on how I can go about making changes to the below string to make this happen?
Bookmarks