问题
I have a sheet with a cell that must to show the printed day.
For example, the cell W1, in the sheet 01 will be printed today at night and at moment that print it, that cell must to show the current day.
It has to be automatically when the sheet is printed.
If tomorrow I open the workbook, in that sheet it has to view the day of printed and not NOW()
It could be possible?
Thanks.
回答1:
Open Macro and on the ThisWorkbook:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
For Each wk In Worksheets
wk.Range("W1").Value = Now()
Next
End Sub
来源:https://stackoverflow.com/questions/52770758/fix-date-when-print-sheet-in-excel-2016