Hi viola,
If it's always going to be today's date that you enter, then use DBY's suggestion of Ctrl-; which will enter today's date and it will always stay as that date. (If that is the case, please give him the reputation for answering your question(by clicking the star symbol on the left) - don't give it me, that wouldn't be fair!)
If you want today's date automatically, then try this code, which will enter TODAY in the active cell then make it permanent so it doesn't update:
If you want it to go in a specific cell, try this, altering the cell reference as required:
If you want the date the spreadsheet was created (which might not be today), try this:
Just for completeness, if you want the date the spreadsheet was last modified, use this:
Either of the two previous can be made to enter in a set cell by adding 'Range("A1").Select' as in the second code above. Also, you can alter the date format to whatever you want; if you want your default short date format, use "short date".
Finally, if you want any of these to run automatically when the workbook runs, open the Visual Basic Editor by pushing Alt-F11. Then click the folder on the left called 'Microsoft Excel Objects', then click the 'ThisWorkbook' module and enter the macro like this:
I hope that all makes sense and is of some help.
Regards,
Aardigspook
Bookmarks