INSERT FILEDATE INTO CELL COMMENT

  • Thread starter Thread starter Simon
  • Start date Start date
S

Simon

Hi
Can any one offer some code to insert the modified date of an external xls
file into a cell comment.
Thanks
Simon
 
This should get you started.

Sub test()
Dim myString As String

myString = ""
On Error Resume Next
myString = ThisWorkbook.BuiltinDocumentProperties("Last Save Time")
On Error GoTo 0
If Not myString = "" Then
ActiveCell.AddComment
ActiveCell.Comment.Text Text:=myString
End If

End Sub
 
Give something like this a try...

Dim LastModDateTime As Date, FilePathName As String
.......
.......
FilePathName = "C:\Users\Rick\Documents\Book1.xls"
LastModDateTime = FileDateTime(FilePathName)
 
Thanks Barb
But does this looks like it places the date for the current workbook date. I
am looking to place the date of a completely seperate workbook.
Unless I misread this.
Thnaks
Simon
 
Back
Top