JonnnyExcel
New Member
- Joined
- Feb 9, 2011
- Messages
- 8
I am thinking an IF statement is what I will need but maybe not.
I have VBA code that finds the previous day's file and copies information into today's file. There are occasions when the previous day’s file doesn’t get generated, ie. no data, operator forgot to create file, etc. I need my macro to look for the previous day’s file and if it doesn’t find that file then look for the file from 2 days ago and so on.
I am already using the workday function so weekends and holidays are already figured in.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o> </o>
Thank you in advance.
I have VBA code that finds the previous day's file and copies information into today's file. There are occasions when the previous day’s file doesn’t get generated, ie. no data, operator forgot to create file, etc. I need my macro to look for the previous day’s file and if it doesn’t find that file then look for the file from 2 days ago and so on.
I am already using the workday function so weekends and holidays are already figured in.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o> </o>
Thank you in advance.