Updating a last modified date for each sheet upon data entry

jedale

New Member
Joined
Oct 31, 2005
Messages
8
I want to be able to find out when each sheet within a workbook last had data entry. All the examples on this site provide the date of the last time the file was saved. Is it possible to break this down to each individual sheet? Is there also a way to have it calculate this in real-time? If not, then upon the opening of the workbook? Thank you for your time.

Jeffrey Dale
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Jeffrey

You could use the SheetChange event of the workbook.

This would be triggered every time a change was made in any sheet in the workbook.
Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    Sh.Range("A1") = Now
End Sub
 
Upvote 0
Can anybody Help me with implenting it

I am having trouble implementing the code.

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal target Sh.Range("A1") = Now
End Sub

What do I put in for "Sh" and "target" variables?
Do I put in my sheet name for "Sh"?
I want to have it check over the whole sheet and individual cells for different instances.
I am assuming that { Sh.Range("A1") = Now } code is putting in the current date into the A1 cell, am I correct?

Thanks for your help!

Jeff Dale
 
Upvote 0
Jeff

You don't put anything for Sh or Target.

They are parameters passed to the code and represent the worksheet (Sh) that is being changed and the range (Target) that is being changed.

Your assumption is correct.

The code I posted will be triggered when any worksheet is changed.

If you only want it for one worksheet you would probably be better off with a Worksheet change event.
 
Upvote 0

Forum statistics

Threads
1,206,947
Messages
6,075,806
Members
446,158
Latest member
octagonalowl

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top