What's the best way to prevent users from changing margins?

  • I hide my ribbon, so users can't change the margins from there.
    I am having absolutely no luck with Private Sub Workbook_BeforePrint(Cancel As Boolean)
    My best solution, so far, is the code below, which sets the margins when the user clicks the Print CommandButton.
    But it still doesn't prevent the user from changing the margins once they are in Print Preview.
    Can Page Setup be greyed out?
    Is there a way that even if the change it, it immediately reverts back to my default settings?
    Thanks


  • Re: What's the best way to prevent users from changing margins?


    I believe something along the following lines may work:


    Code
    1. Dim MyPrint As CommandBar
    2. Set MyPrint = Application.CommandBars("Worksheet Menu bar")
    3. MyPrint.Controls("&File").Controls("Print Pre&view").Enabled = False