Hi Excel Forum,

I'm on the verge of finishing a project, and just want to add this last thing to make the whole thing a little bit more user friendly.

My project involves retrieving and matching data from two separate date-coded reports (formatted differently, which is something I can do nothing about). At the moment, the macros I've written (which work perfectly), retrieve the previous days data and do everything I need them to. However, I want to add a functionality to access historical data (for comparison purposes), and currently the only way to do this is to hardcode in the date, which is obviously not as polished as it could be!

My idea is that the function would ask the user if they wanted to automatically select the files to process (and then run the existing code that sets the variables TodaysDate1, TodaysDate2 & TodaysDate3), but if they click no, displays an input box that prompts them to input the date (as dd/mm/yyyy or a calendar or whatever), and then sets the above variables accordingly.)

I read something about returning it as an array and then splitting it, but I'm not quite sure whether that would work and how.

I've posted the portion of the code that would call this function below (its part of a much larger sub, but this is the only bit I would have thought was relevant):

Please Login or Register  to view this content.
Thanks in advance for your help.

Jonathan

---------- Post added at 07:04 AM ---------- Previous post was at 06:17 AM ----------

Hi all, realised the solution had been staring me in the face.

Have ammended the code as follows:

Please Login or Register  to view this content.