From: Simon on
Hi
Can any one offer some code to insert the modified date of an external xls
file into a cell comment.
Thanks
Simon
From: Barb Reinhardt on
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

--
HTH,

Barb Reinhardt



"Simon" wrote:

> Hi
> Can any one offer some code to insert the modified date of an external xls
> file into a cell comment.
> Thanks
> Simon
From: Rick Rothstein on
Give something like this a try...

Dim LastModDateTime As Date, FilePathName As String
.......
.......
FilePathName = "C:\Users\Rick\Documents\Book1.xls"
LastModDateTime = FileDateTime(FilePathName)

--
Rick (MVP - Excel)



"Simon" <Simon(a)discussions.microsoft.com> wrote in message
news:DE5D8AA7-8C0F-4D3B-AC07-6C86F1CBDBA2(a)microsoft.com...
> Hi
> Can any one offer some code to insert the modified date of an external xls
> file into a cell comment.
> Thanks
> Simon

From: Simon on
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

"Barb Reinhardt" wrote:

> 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
>
> --
> HTH,
>
> Barb Reinhardt
>
>
>
> "Simon" wrote:
>
> > Hi
> > Can any one offer some code to insert the modified date of an external xls
> > file into a cell comment.
> > Thanks
> > Simon