Prohibit printing in Excel

Source: Internet
Author: User

Usually in the operation of Excel 2007 we may not always encounter the Print button. Or some people don't pay much attention to saving. Print Excel 2007 files at will. Even directly print Excel 2007 files that are generally prohibited from printing. In the case of the need to operate without shadow 014 Excel 2007 File Edit save. How do we reject file printing?

In fact, this is relatively simple. We just need to use a macro command to solve, the soldiers gymnastics as follows: Press ALT+F11 to open the VBA editor. If the VBA project pane is not displayed, press the key combination ctrl+r will be paged out; right-click ThisWorkbook. Select "Stone Code Two" and then enter in the Code window:

Private Sub

Workbook_betoreprint (Cancel as Boolean)

Cancel. True

Msobox. Save paper reject print ". Vblnformalion End Sub

Then we have a combination chain alt+f11 back to Exce12007 (see Figure 1). After that, not 20 you are directly clicking the Print button. Or select from the Office Button. Print: Or use the Quick Search ctrl+p, you can't print directly. Will only show you the IQ in the macro instructions in the prompt. Save paper and refuse to print. This also lets you know that printers can't print because it's intentional. Not the hardware or software problem.

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.