Custom Function returnig a Date Value
Posted by Ernst Glatzer on May 11, 2001 2:05 AM
Hi,
i have a custom function returning a date value like
this one:
Function MyDate() as Date
MyDate=Dateserial(2001,05,11)
End Function
and i want it to change the NumberFormat of the Cell in
which i put it to 'Date'. i have tried
Application.Caller.NumberFormat = "yyyy-mm-dd"
but this doesn't work.
When i put =MyDate() into Cell A1, it shows 37022.
I don't want to change the Format manually - i wnt to have it done by the function (macro).
Can anybody help?
Thanks
Ernst