Hi,
I am trying to use VBA to perform a query on our SQL2005 server but I would like to use dates entered in cells B1 and B2 to replace the START_DATE in the query instead of hard coding the dates. The START_DATE field is formatted as datetime and our system uses the dd/mm/yyyy hh:mm:ss format. When I run the code below, it is working fine but I am not sure how I can replace the START_DATE (e.g. entered as 01/01/2012 dd/mm/yyyy) with cell references. Any help would be much appreciated. Thanks.
Moderator's Note: Put code tags on your codes. Thanks.
Bookmarks