Last Modified date??
Find bottlenecks in your Excel workbooks
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Last Modified date??

  1. #1
    New Member
    Join Date
    Feb 2002
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    I require the date to appear on a document, that shows the date the document was last saved AFTER BEING MODIFIED. The document contains many VB macro's that control printing and viewing (Therefore making changes to format etc, and manually calculating). This causes "=today()" to change when the document is viewed, but not modified.

    [ This Message was edited by: MarkyD on 2002-03-06 00:22 ]

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Newcastle, UK
    Posts
    1,174
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    A Quick solution might be

    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

    Range("A1").Value = Today()

    End Sub
    "Have a good time......all the time"
    Ian Mac

  3. #3
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    On 2002-03-06 00:20, MarkyD wrote:
    I require the date to appear on a document, that shows the date the document was last saved AFTER BEING MODIFIED. The document contains many VB macro's that control printing and viewing (Therefore making changes to format etc, and manually calculating). This causes "=today()" to change when the document is viewed, but not modified.

    [ This Message was edited by: MarkyD on 2002-03-06 00:22 ]

    'This UDF may help

    Function FileLastMod() As String
    Dim FileDate As Double

    On Error Resume Next
    FileDate = FileDateTime(ThisWorkbook.FullName)
    If Err.Number = 0 Then
    FileLastMod = Format(FileDate, "dd/mm/yy hh:mm:ss")
    Else
    FileLastMod = "Error"
    End If
    End Function


    'Place in a Module and call from worksheet as follows

    '=FileLastMod("D:Xl_usefulFiledateFunction.xls")


    HTH

    Ivan

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com