Forum Discussion

jburrell's avatar
jburrell
Copper Contributor
Feb 22, 2023

How can I create a last modified macro for each worksheet?

Hi All,

 

I want to create a macro so that I can see the last modified date for each worksheet not the entire workbook*. How do I go about this? I tried to modify the last modified formula so that it is specific to a sheet and then I would create a new one for each sheet that I want to see as per below and then i did =LastModifiedk() in a cell. However, I get a "VALUE!" error. Thanks!

 

 

  • jburrell 

    Document Properties only apply to the workbook as a whole, not to individual worksheets.

    It would be possible to write VBA to register when the user last changed the value of any cell in a worksheet. Where would you like this information to be stored? In a cell on the worksheet itself, or on a summary sheet, or ...?

    • jburrell's avatar
      jburrell
      Copper Contributor
      Hi Hans,

      Ah ok, that sounds more of what I am looking for. Yes, I would like to show if a user has amended any cell in a worksheet. I want to store the information on a summary sheet.

      Thanks,
      Jamie
      • jburrell 

        See the attached sample workbook. The code is in the ThisWorkbook module (under Microsoft Excel Objects in the Project Explorer pane of the Visual Basic Editor).

        You'll have to allow macros when you open it, obviously.

Resources