J
Jay
I want to put the date the file was saved into the footer
of my spreadsheet. I wrote a small user defined function
that incorporates FileDateTime(). I can get the date to
appear in a msgbox, but when I try to use the same
function to write to a cell, I get an error. It
says "That name is not valid". What am I doing wrong and
how do I fix it?
Here is my code:
Public Function MyDate() As Variant
' Get the file date and export it to a cell.
MyDate = FileDateTime("thisfile.xls")
MsgBox MyDate, vbOKOnly, "Current"
End Function
Thanks,
Jay
of my spreadsheet. I wrote a small user defined function
that incorporates FileDateTime(). I can get the date to
appear in a msgbox, but when I try to use the same
function to write to a cell, I get an error. It
says "That name is not valid". What am I doing wrong and
how do I fix it?
Here is my code:
Public Function MyDate() As Variant
' Get the file date and export it to a cell.
MyDate = FileDateTime("thisfile.xls")
MsgBox MyDate, vbOKOnly, "Current"
End Function
Thanks,
Jay