I have a recorded macro which basically does a query on an external worksheet with a filter on a date column and a department number column. Macro attached.
The .CommandText statement has a WHERE clause in it which filters the date and department number and I am wondering if there is a way of making these filters variables such as MyDate and MyDept.
Many thanks
Bookmarks