From: Simon on 27 Mar 2010 22:11 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 27 Mar 2010 22:35 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 27 Mar 2010 22:44 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 29 Mar 2010 03:35 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
|
Pages: 1 Prev: FASTER USE OF THE REPLACE() FUNCTION !!!!! Next: VBA Chart Size Accuracy |