Prohibiting Printing
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 6 of 6

Thread: Prohibiting Printing

  1. #1
    New Member
    Join Date
    Mar 2002
    Location
    Arkansas
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    I created a workbook in Excel that is viewed only by a select number of mgrs within my company. The workbook is password protected (both the open and to modify) in a shared drive. My superiors just asked if there was a way I could set it up that people could view the workbook but not be able to print it. Does anyone know of a way? Many thanks!

    _________________
    Beth

    [ This Message was edited by: ejd0077 on 2002-03-05 14:50 ]

  2. #2
    MrExcel MVP Tom Urtis's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, California USA
    Posts
    11,136
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    See if this related thread helps.

    http://www.mrexcel.com/board/viewtop...1033&forum=2&4

    Tom Urtis

  3. #3
    New Member
    Join Date
    Mar 2002
    Location
    Arkansas
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thank you for your quick reply... The suggestions look just like what I am needing.

    The workbook uses a pivot table that the mgrs can use to select different areas, so I think I am going to use the VB code instead of setting the print area and turning the sheet protection on.

    AGAIN - many thanks. I would have researched this for days (probably to no avail).

    _________________
    Beth

    [ This Message was edited by: ejd0077 on 2002-03-06 06:38 ]

  4. #4
    New Member
    Join Date
    Mar 2002
    Location
    Arkansas
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I enterd the following VB code:

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

    It is still printing... Any suggestions.

  5. #5
    MrExcel MVP lenze's Avatar
    Join Date
    Feb 2002
    Location
    Helena, MT
    Posts
    13,690
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Beth: Where are you putting the code? It needs to be in the WorkBook module. Right click on the Excel Icon next to the workbook name in the title bar and choose View Code to open the module. Paste the code here. You can also access the Workbook module from the VBA editor (ThisWorkbook)

  6. #6
    New Member
    Join Date
    Mar 2002
    Location
    Arkansas
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    You were right!!! I was putting the code in the wrong place. After moving it to ThisWorkbook, it worked just fine!

    I appreciate your help. I was getting a little anxious.

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com