Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default INSERT FILEDATE INTO CELL COMMENT

Hi
Can any one offer some code to insert the modified date of an external xls
file into a cell comment.
Thanks
Simon
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default INSERT FILEDATE INTO CELL COMMENT

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default INSERT FILEDATE INTO CELL COMMENT

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default INSERT FILEDATE INTO CELL COMMENT

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert comment to Cell ManhattanRebel Excel Discussion (Misc queries) 1 January 10th 09 01:09 PM
Insert a File, not a Comment, to a Cell Curious[_6_] Excel Programming 1 October 11th 08 02:32 AM
Macro to Insert Comment to a cell wojo Excel Programming 0 July 21st 05 04:06 PM
How do I insert a comment when the Insert:Comment menu is greyed? none Excel Discussion (Misc queries) 0 May 19th 05 12:36 AM
How do I report the filedate in an Excel2000 cell? IaSwede Excel Worksheet Functions 1 March 3rd 05 02:08 PM


All times are GMT +1. The time now is 05:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"