> How about this?
>
[quoted text clipped - 21 lines]
>> TIA
>> David
Can't seem to get it to work. Any other ideas
JP - 15 Nov 2007 01:34 GMT
It worked on my machine.
1. Did you paste it into a standard module?
2. Did you fix the word wrapping? The Google text editor wraps the
function and might cause unintended errors.
You might have to "qualify" the reference, for example if I put the
function into my personal (hidden) workbook, I would call the function
by typing =PERSONAL.XLS!CreationDate()
HTH,
JP
> > How about this?
>
[quoted text clipped - 25 lines]
>
> - Show quoted text -
Gord Dibben - 15 Nov 2007 01:48 GMT
That Function stored in a module in the Template will give you the creation date
of the Template only, not the workbook you just opened from the Template.
The opened workbook has no created date until it is saved.
To get a date for workbook just created you could place code in the Template
Thisworkbook module.
Note:you will have to open the Template itself to add the code, not just a
workbook opened from the Template.
Private Sub Workbook_Open()
If ActiveWorkbook.ActiveSheet.Range("A1") = "" Then
ActiveWorkbook.ActiveSheet.Range("A1").Value = Format(Date, "mmmm dd yyyy")
End If
End Sub
Note.....when you save the workbook the code will be saved with it, creating the
macro warning when the saved workbook is opened again.
It might be easier to train your users to hit CTRL + ; on a cell when they first
open the workbook.
Gord Dibben MS Excel MVP
>> How about this?
>>
[quoted text clipped - 23 lines]
>>
>Can't seem to get it to work. Any other ideas
David - 15 Nov 2007 23:08 GMT
> That Function stored in a module in the Template will give you the creation date
> of the Template only, not the workbook you just opened from the Template.
[quoted text clipped - 48 lines]
>>>
>> Can't seem to get it to work. Any other ideas
Works Great now Thank you Both for your help