I created a UDF to return the modify date and time of a file located on a network drive. I entered the function in a cell and UDF returns the correct date. But, how do I get the function to automatically calculate? When I open the file, the last value of the UDF still displays in the cell even though a new version of the file that the UDF points to has updated. If I click in the cell that contains the UDF and press F2, then hit enter, the date value updates. The formula calculation method is set to automatic. Here is the UDF.
Public Function RecDate()
RecDate = FileDateTime("F:\folder1\Projections\Rec File.xlsx")
End Function
Public Function RecDate()
RecDate = FileDateTime("F:\folder1\Projections\Rec File.xlsx")
End Function