View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] kitabug124@gmail.com is offline
external usenet poster
 
Posts: 1
Default FileDateTime(path) - doesn't work across network???

I can't remember where I found this, so I am not able to give proper credit. My apologies. Anyway, this is the code that I am using and it works for me with spreadsheets in SharePoint in the cloud.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Sheets("Metrics").Range("O1").Value = Now
End Sub

In the cell where I want the date and time to show, I put =Now()

You may need to put the name of your spreadsheet where "Metrics" is. I must confess that I do not know why or how it works for me, only that it does.