Skip to content

Instantly share code, notes, and snippets.

@Se7enSquared
Created November 12, 2021 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Se7enSquared/a90a787fad37acf56c586976d2898fa1 to your computer and use it in GitHub Desktop.
Save Se7enSquared/a90a787fad37acf56c586976d2898fa1 to your computer and use it in GitHub Desktop.
Private Sub DateStampCell(stamp_rng As Range, worksheet_list As Collection)
On Error GoTo catch_error:
For Each sht In worksheet_list
stamp_rng.Value = "Last Updated: " & Now & " Data since: " & [LastRunDate]
Next sht
Exit Sub
catch_error:
If testing_mode = True Then GoTo debug_error
Libraries.LogErrorMessageToXls "Date stamping a cell has failed in " & ThisWorkbook.Name, "Macro error: " & Err.Description & " in DateStampCell subroutine", "https://hp.sharepoint.com/teams/WS OEM PRGM/OCMS Reports/AutomationErrorLogs.xlsx", "ErrorLog", "tbl_ErrorLog"
debug_error:
Application.DisplayAlerts = True
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment