Hi flebber;
I don't work in XL2007, so if my observations don't make sense, just ignore them.
1) LastSaved will ALWAYS be before Now. There is no way in the world that the file was saved at some time in the future.
I'm guessing that you want to check LastSaved against the value stored in D4.
Also, LastSaved should return a Date not a string.
2) The following code will "Do Nothing" if some test is true
or usually more effieciently
3) What is this line supposed to do?
I'm guessing that you want to put Now into D4. If so then:
4) If you want DateTime() to work on Workbook_Open you need this sub in ThisWorkbook module
And put DateTime into a Standard Module and don't make it Private (otherwise Workbook_Open() won't find it).
5)
I'm guessing that when you say:
Then test if one of two merged cells contains text and keep testing until it does and then insert time in cell.
you mean that when the file opens to keep testing the cell until it changes.
If that is right, there is a MUCH more efficient way to do it.
Assuming that the cell to test is G3, put this in Sheet 1 module
6) Don't know what you mean by this line.
Third try to ensure date does not update when file reopened unless user manually writes date or time.
The file will always be reopened whenever the file is opened (except when it's first being created).
Bookmarks