ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Updating a DATE, only if the page has been modified. (https://www.excelbanter.com/excel-discussion-misc-queries/260690-updating-date-only-if-page-has-been-modified.html)

Michael

Updating a DATE, only if the page has been modified.
 
I have a spreadsheet with a cell containing:
="Print Date: "&Text(TODAY(),"mmm-dd-yyyy")

I want to add another cell that reflects the date of the last time the sheet
was modified/changed.

So the logic would be somthing like:
IF (Sheet-Changed, Current-Date, Previous-Date)

Can any one point me in the right direction?

Thank you

Jim Thomlinson

Updating a DATE, only if the page has been modified.
 
That requires custom VBA code. If you want help with that just let us know.
--
HTH...

Jim Thomlinson


"Michael" wrote:

I have a spreadsheet with a cell containing:
="Print Date: "&Text(TODAY(),"mmm-dd-yyyy")

I want to add another cell that reflects the date of the last time the sheet
was modified/changed.

So the logic would be somthing like:
IF (Sheet-Changed, Current-Date, Previous-Date)

Can any one point me in the right direction?

Thank you


Michael

Updating a DATE, only if the page has been modified.
 
Jim

Any help would be greatly appreciated. I just looked through the Excel 2003
Bible, and while I have some knowledge of C++ I am over my head with VBA
right now.

Pointing me in the right direction would be great, where to read, code
snippets ect.

Thank you

"Jim Thomlinson" wrote:

That requires custom VBA code. If you want help with that just let us know.
--
HTH...

Jim Thomlinson


"Michael" wrote:

I have a spreadsheet with a cell containing:
="Print Date: "&Text(TODAY(),"mmm-dd-yyyy")

I want to add another cell that reflects the date of the last time the sheet
was modified/changed.

So the logic would be somthing like:
IF (Sheet-Changed, Current-Date, Previous-Date)

Can any one point me in the right direction?

Thank you


ozgrid.com

Updating a DATE, only if the page has been modified.
 
Name a cell "LastSaved" and use this code in ThisWorkbook Module.

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
With Range("LastSaved")
.Value = "Time & date of last change is: " & Format(Now, "mm-dd-yyyy
h:mm")
.EntireColumn.AutoFit
End With
End Sub


Or, look into BuiltInDocumentProperties which can tell you;

Title
Subject
Author
Keywords
Comments
Template
Last author
Revision number
Application name
Last print date
Creation date
Last save time
Total editing time
Number of pages
Number of words
Number of characters
Security
Category
Format
Manager
Company
Number of bytes
Number of lines
Number of paragraphs
Number of slides
Number of notes
Number of hidden Slides
Number of multimedia clips
Hyperlink base
Number of characters (with spaces)
Content type
Content status
Language
Document version


--
Regards
Dave Hawley
www.ozgrid.com
"Michael" wrote in message
...
I have a spreadsheet with a cell containing:
="Print Date: "&Text(TODAY(),"mmm-dd-yyyy")

I want to add another cell that reflects the date of the last time the
sheet
was modified/changed.

So the logic would be somthing like:
IF (Sheet-Changed, Current-Date, Previous-Date)

Can any one point me in the right direction?

Thank you



Michael

Updating a DATE, only if the page has been modified.
 
Dave

Thank you for taking the time for the detailed explaination. This points me
in the right direction. It will take me a while to understand the macro you
have written, but it is what I need.

The second listing of object values is also very helpful.

Thanks

Michael

"ozgrid.com" wrote:

Name a cell "LastSaved" and use this code in ThisWorkbook Module.

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
With Range("LastSaved")
.Value = "Time & date of last change is: " & Format(Now, "mm-dd-yyyy
h:mm")
.EntireColumn.AutoFit
End With
End Sub


Or, look into BuiltInDocumentProperties which can tell you;

Title
Subject
Author
Keywords
Comments
Template
Last author
Revision number
Application name
Last print date
Creation date
Last save time
Total editing time
Number of pages
Number of words
Number of characters
Security
Category
Format
Manager
Company
Number of bytes
Number of lines
Number of paragraphs
Number of slides
Number of notes
Number of hidden Slides
Number of multimedia clips
Hyperlink base
Number of characters (with spaces)
Content type
Content status
Language
Document version


--
Regards
Dave Hawley
www.ozgrid.com
"Michael" wrote in message
...
I have a spreadsheet with a cell containing:
="Print Date: "&Text(TODAY(),"mmm-dd-yyyy")

I want to add another cell that reflects the date of the last time the
sheet
was modified/changed.

So the logic would be somthing like:
IF (Sheet-Changed, Current-Date, Previous-Date)

Can any one point me in the right direction?

Thank you




All times are GMT +1. The time now is 01:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com