Google Groepen ondersteunt geen nieuwe Usenet-berichten of -abonnementen meer. Historische content blijft zichtbaar.

Last update date..

12 weergaven
Naar het eerste ongelezen bericht

Timmy

ongelezen,
12 sep 2002, 08:43:4912-09-2002
aan
How I can insert in a cell that whenever this worksheet ic
changed or worked on it should update the date

e.g. This sheet was last updated on "Sep. 12, 2002".

TIA

David McRitchie

ongelezen,
12 sep 2002, 09:19:0512-09-2002
aan
Hi Timmy,

Excel does not maintain such data, you will have to do this yourself
in a macro, specifically using an Event macro, (excel 97 and up).
Naturally you would not be interested in recalculations.

A worksheet_change event will not recognize entry of a date with a
short-cut (Ctrl+;), nor will it recognize a change by pasting a value. You
must actually key in a change. It is possible to change multiple cells.

Unlike regular macros which are installed in regular modules,
Worksheet Events are installed with the worksheet by rightclicking
on the sheettab, choose 'view code', and then paste in your macro.

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False 'should be part of Change macro
Range("F1").value = "Sheet Last Updated: " & format(now(),"yyyy-mm-dd")
Application.EnableEvents = True 'should be part of Change macro
End Sub

I usually test for what column or cell is being changed but that would
not be necessary here.

More information on Event macros in
Worksheet Events and Workbook Events
http://www.mvps.org/dmcritchie/excel/event.htm

You might also look at
Highlight, Change Highlighting
http://www.mvps.org/dmcritchie/excel/highlite.htm
specifically the alternatives to the above using macro.

HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Macros: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Timmy" <ptk...@hotmail.com> wrote in message news:f45601c25a5a$0aeee4e0$36ef2ecf@tkmsftngxa12...

0 nieuwe berichten