I use the below code to know the last modify.
but every time that I open the sheet and the first time that I try to save it, a run-time error message appear.
What can I do to resolve?
![]()
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Worksheets("sheet1").Range("N2").Value = Now() End Sub
Bookmarks