Last run date of a macro

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hi

Welcome to the Board

Not unless some kind of timestamp was built into the macro.

KR


Dave
 
Upvote 0
Perhaps adding something like

Code:
Sheet1.Range("A1").Value = DateTime.Now

Change ranges to suit a disused cell well out the way cell on your spreadie (or even another hidden sheet then format your range as ;;; this way noone will see it

HTH

Dave
 
Upvote 0
Well, I came up with this:

Code:
Sub log()
Application.ScreenUpdating = False
Workbooks.OpenText Filename:="C:\Macro Run Dates.xls"
[a1].Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Select
ActiveCell = "Macro Name"
ActiveCell.Offset(0, 1).Select
ActiveCell = "=today()"
ActiveCell.Copy
ActiveCell.PasteSpecial xlPasteValues
Workbooks("Macro Run Dates.xls").Save
Workbooks("Macro Run Dates.xls").Close
Application.ScreenUpdating = True
End Sub

I figured I could put that at the beginning of each of my macros, and replace "Macro Name" with that sub's name. OR, if I knew how to automatically have it enter the name of the macro, I could just call the log macro at the beginning of each one. Is there a way to do that?
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,215
Members
448,554
Latest member
Gleisner2

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