Incognitus
09-13-2012, 02:32 PM
Hi all,
I've got a macro which looks through all the worksheets in a document and deletes all worksheets that have a name equal to the date ten days before today. And it works!
However, I've since discovered that the worksheets have to contain the date and time - which stops this from working correctly.
Also, in order to find dates older than ten days before today, do I have to make each worksheet name into a variable, truncate this, define it as a date and then do a Greater Than comparison or is there a simpler way?
: pray2:
[I don't have the code available as I'm outside of work, but can make it available if needed]
I've got a macro which looks through all the worksheets in a document and deletes all worksheets that have a name equal to the date ten days before today. And it works!
However, I've since discovered that the worksheets have to contain the date and time - which stops this from working correctly.
Also, in order to find dates older than ten days before today, do I have to make each worksheet name into a variable, truncate this, define it as a date and then do a Greater Than comparison or is there a simpler way?
: pray2:
[I don't have the code available as I'm outside of work, but can make it available if needed]