+ Reply to Thread
Results 1 to 4 of 4

Print Protected

  1. #1
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,723

    Print Protected

    Hello all,

    Where I work, we share printer. I don’t want to ever to accidentally press “print” option or the shortcut print. Did this one time in my other workbook.

    I have a workbook that has a confidential information on each every worksheet. This workbook will never be printed by me since it has a confidential on it.

    Is there a vba code to protect my workbook to accidentally print to the printer?

    Thanks in advance :o)

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831
    Hi !

    Cancel the print in the Workbook_BeforePrint event …

  3. #3
    Forum Contributor
    Join Date
    10-05-2014
    Location
    CALIFORNIA
    MS-Off Ver
    2010
    Posts
    1,723

    Re: Print Protected

    Hi,
    I don't have the vba code yet.
    Sorry... I have a minimal knowledge with the code.

    Thanks.

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool

    To paste to the ThisWorkbook module :

    PHP Code: 
    Private Sub Workbook_BeforePrint(Cancel As Boolean)
        
    Cancel True
    End Sub 
    Do you like it ? So thanks to click on bottom left star icon « Add Reputation » !

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Protected Worksheet Autofit Cell Contents Won't Print
    By dermasse in forum Excel General
    Replies: 0
    Last Post: 09-02-2015, 08:58 AM
  2. [SOLVED] Can not Print Embedded Graph on Protected Worksheet with Macro
    By Henk Stander in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-27-2012, 06:54 AM
  3. [SOLVED] VBA Print Code and Protected Sheet Problem
    By Usethaschwarz in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-15-2012, 04:19 PM
  4. Print protected excel graphs
    By ken1010 in forum Excel General
    Replies: 1
    Last Post: 06-17-2010, 03:07 PM
  5. print a protected area - how?
    By hydro in forum Excel General
    Replies: 1
    Last Post: 04-22-2008, 04:44 PM
  6. Selecting Print area in protected worksheet
    By DRB in forum Excel General
    Replies: 5
    Last Post: 01-12-2006, 06:45 PM
  7. [SOLVED] Chaning Print Settings in Password Protected File
    By Cheryl B. in forum Excel General
    Replies: 2
    Last Post: 06-03-2005, 07:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1