excel vba‎ > ‎

VBA - date and time on save doc

posted Sep 9, 2015, 2:32 AM by Roberto Felicini
Alla chiusura del workbook:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
With Me.Worksheets("Foglio1")
.Range("A1").Value = "=TODAY()"
End With
End Sub


Ad ogni salvataggio(ribadisco: ogni salvataggio):

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
With Me.Worksheets("Foglio1")
.Range("A1").Value = "=TODAY()"
End With
End Sub

Qui metto la data in A1 del Foglio1. Modificare di conseguenza.
Comments