Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Michigan, USA
    Posts
    408
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Protect Print Range (Office 2000-2003)

    Is it possible to protect the print range as well as cells in a worksheet? We have an expense report form that prints exactly on one page but when (some) staff use the template the report prints on 2 pages. Another thought, are margins saved within a sheet or does the individual user's settings take priority? If possible we would like to prevent the changing of any print setting in the template. I'm guessing it isn't possible.

    Thanks.
    <font face="Comic Sans MS"><big><font color=4682b4>Sherry</font color=4682b4></big></font face=comic>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Protect Print Range (Office 2000-2003)

    As far as I know, you cannot really protect those, but you could create a Workbook_BeforePrint event procedure in the ThisWorkbook module that resets the print area and the margins each time the workbook is printed. Of course, this won't work if the user disables macros.

    Example code:
    <code>
    Private Sub Workbook_BeforePrint(Cancel As Boolean)
    With Worksheets("Sheet1").PageSetup
    .PrintArea = "$A$1:$E$20"
    .LeftMargin = Application.InchesToPoints(1.25)
    .RightMargin = Application.InchesToPoints(0.75)
    End With
    End Sub
    </code>
    PS: margins are stored with each worksheet.

  3. #3
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Michigan, USA
    Posts
    408
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Protect Print Range (Office 2000-2003)

    Thanks Hans. We'll give it a try.
    <font face="Comic Sans MS"><big><font color=4682b4>Sherry</font color=4682b4></big></font face=comic>

  4. #4
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    199
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Re: Protect Print Range (Office 2000-2003)

    Hi,

    For what it is worth, if people are not all using the same printer to print the report then it is possible that the problem may relate to the way some printers are setup, or how they are setup on some PC's. Most of the Excel settings in a template will not be overwritten by a user's settings, unless they are specifically changed.

    Try and tie the problem to a specific PC or a specific printer.

    Or allow a little more room for the report to fit on a page. 1 or 2 percent in the Page Setup, Page, Scaling may be all that is needed.

    Good Luck!

    Peter Moran

Posting Permissions

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