I've written a UDF to add a time stamp to a workbook to note when the data source has been updated. The issue I'm running into is that in order for the UDF to update the cell, you have to click on the function and hit enter. Here is the code
Code
Function FiledateLastMod(Filename As String) As String
Application.Volatile
Dim FileDate As Double
On Error Resume Next
FileDate = FileDateTime(Filename)
If Err.Number = 0 Then
FiledateLastMod = Format(FileDate, "Mmmm dd, yy h:mm am/pm")
Else
FiledateLastMod = "Error"
End If
End Function
Display More