保存時に日時とPC名を入力
書き込む場所は、ThisWorkbook 。
A1に日時、B1にPC名を書き込む場合。
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ActiveSheet.Unprotect
ActiveSheet.Range("A1").Value = Now
ActiveSheet.Range("B1").Value = Environ("COMPUTERNAME")
ActiveSheet.Protect
End Sub
A1の書式設定↓
"最終更新日時: "m"月"d"日("aaa") "h:mm
B1の書式設定↓
"更新PC名: "@