在Excel 2016中打印工作表时的修复日期 [英] Fix date when print sheet in excel 2016

查看:103
本文介绍了在Excel 2016中打印工作表时的修复日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有必须显示打印日期的单元格的工作表。

I have a sheet with a cell that must to show the printed day.

例如,工作表01中的单元格W1今天晚上将被打印在打印时,该单元格必须显示当天。

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.

如果明天我打开工作簿,则必须在该工作表中查看印刷日期,而不是 NOW()

If tomorrow I open the workbook, in that sheet it has to view the day of printed and not NOW()

有可能吗?

谢谢。

推荐答案

打开宏和在ThisWorkbook上:

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

这篇关于在Excel 2016中打印工作表时的修复日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆