Excel 2007 Application: Saving paper, refusing to print

Source: Internet
Author: User

Now the office is more and more inclined to paperless office, Excel2007 application has become more frequent. However, during the operation of the Excel2007 we may accidentally touch the Print button or some people do not pay much attention to saving, more casual printing Excel2007 files, or even directly prohibit ordinary people to print Excel2007 files. How do we reject file printing without affecting the Excel2007 file's edit-save growth operation?

In fact, this is relatively simple, we need to use a section of the macro instructions can be resolved, the specific operations are as follows:

Press ALT+F11 to open the VBA editor, and if the VBA project pane is not displayed, press the key combination ctrl+r to bring it up; Right-click "This Workbook", select "View Code", and then enter in the Code window:

The following is a code fragment:
Private Sub
Workbook_beforeprint (Cancel as Boolean)
Cancel = True
MsgBox "save paper refuse to print", vbinformation
End Sub

Then we press the key combination alt+f11 to return to Excel2007. In this way, whether you click the Print button directly, or choose "Print" from the Office Button, or use the shortcut key ctrl+p, you can not print directly, will only show you in the macro instructions entered in the prompt "save paper refused to print." This also lets you know that the reason for not printing is intentional, not hardware or software problems.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.