ChuckRobert
Board Regular
- Joined
- Feb 26, 2009
- Messages
- 64
I built a master workbook in Excel 2003 that contains production data linked in from about 20 other workbooks. The information in the master workbook needs to be archived each day as it is overwritten the following day. I have a macro that creates an archive copy in another folder, with the current date. The problem is that the macro can be cancelled with a message box. Occassionally, it is cancelled expecting someone else will archive it later in the day, but no one does. I deleted the message box from Shift 1 and Shift 2, causing it to auto-archive everytime the workbook is closed, eliminating the problem.
However, I need help with Shift 3. They come in at 10 PM. I they were to open and close the workbook before midnight, it would over-write the good archive copy from the end of their shift earlier that morning.
Cell A2 contains the current date, and cell A3 is foramted for time.
Does anyone know how can I can control the macro to reference the time and automatically run if the current time is earlier than 1 PM, but cancel if later than 1 PM on any given day?
However, I need help with Shift 3. They come in at 10 PM. I they were to open and close the workbook before midnight, it would over-write the good archive copy from the end of their shift earlier that morning.
Cell A2 contains the current date, and cell A3 is foramted for time.
Does anyone know how can I can control the macro to reference the time and automatically run if the current time is earlier than 1 PM, but cancel if later than 1 PM on any given day?