================================== Declaration ==================================
The copyright of this article is owned by author
Do not reprint the right to hold the law without the author's authorization
This article is original, has been reproduced authorized, must be prominently noted in the text of the author and source, and ensure the integrity of the article (including this statement).
The authorized person may not re-authorise third parties.
Do not modify (including this statement) without the authorization of the author, and reserve the right of legal investigation.
Do not use the academic citation without the author's authorization.
Do not use for commercial publishing, commercial printing, commercial references, or other commercial purposes without the authorization of the author. <--------One day I'm going to make a template myself to kill this potato.
In order to ensure the correct contents, we suggest that we should read the original text.
This article link: http://www.cnblogs.com/wlsandwho/p/4585801.html
=======================================================================
The following code implements the ThisWorkbook in the
If you allow macros to run
Automatically fill the current time when the A1 cell is turned off when auto-save does not pop up any prompt dialog box
If you disable macros from running
No effect on the current Excel file as usual
private sub Workbook_beforeclose ( Cancel as boolean ) Application.DisplayAlerts = false Span style= "color: #000000;" > Thisworkbook.save application.displayalerts = true end Sub private sub Workbook_Open () Range ( a1 Span style= "color: #800000;" > " ). Select Activecell.formular1c1 = =now () end Sub
This is exactly the print time when printing .
=======================================================================
This requires that Excel be allowed to run the macro
Office--excel turn automatic modification off auto Save