![]() |
|
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Feb 2002
Posts: 3
|
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 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Newcastle, UK
Posts: 1,174
|
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 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
'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 |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|