+ Post New Thread
Results 1 to 4 of 4
Windows Thread, Excel Disable Printing in Technical; Hi I have an Excel worksheet that I want to disable printing on. I have tired the following macro but ...
  1. #1

    Join Date
    Apr 2007
    Location
    Ramsbottom, Bury, Lancs
    Posts
    581
    Thank Post
    11
    Thanked 5 Times in 5 Posts
    Rep Power
    20

    Excel Disable Printing

    Hi
    I have an Excel worksheet that I want to disable printing on. I have tired the following macro but still prints

    Private Sub Workbook_BeforePrint(Cancel As Boolean)
    Cancel = True
    End Sub

  2. #2

    Steve21's Avatar
    Join Date
    Feb 2011
    Location
    Swindon
    Posts
    2,823
    Thank Post
    369
    Thanked 543 Times in 506 Posts
    Rep Power
    184
    Where did you add the macro? If it's not added to the workbook module it wouldn't actually get called by default. (And obviously if the excel file is opened without macro's it won't work either)

    Steve

  3. #3

    Join Date
    Apr 2007
    Location
    Ramsbottom, Bury, Lancs
    Posts
    581
    Thank Post
    11
    Thanked 5 Times in 5 Posts
    Rep Power
    20
    It down as module6 in Excel.
    Does it need to be Private Sub or just Sub.

  4. #4

    Join Date
    Apr 2007
    Location
    Ramsbottom, Bury, Lancs
    Posts
    581
    Thank Post
    11
    Thanked 5 Times in 5 Posts
    Rep Power
    20
    Sorted it. As said above, put it into the worksheet rather than a module and is spot on



SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 6
    Last Post: 23rd December 2010, 07:54 PM
  2. Excel 2007 printing in portrait, not landscape
    By SonnyRider in forum Office Software
    Replies: 4
    Last Post: 20th August 2009, 10:49 PM
  3. [MS Office - 2003] Excel printing documents twice!
    By TheFopp in forum Office Software
    Replies: 6
    Last Post: 25th February 2009, 11:04 PM
  4. Printing Preferences - Excel
    By Psymon in forum Office Software
    Replies: 0
    Last Post: 12th January 2009, 04:18 PM
  5. Disable Photo Printing Wizard in winXP
    By EduTech in forum Windows
    Replies: 7
    Last Post: 2nd May 2008, 02:18 AM

Thread Information

Users Browsing this Thread

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

Posting Permissions

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