Print Sheet/Manual Calcs

sassriverrat

Well-known Member
Joined
Oct 4, 2018
Messages
655
Hey- I have a button on a sheet that is *supposed* to print the print area (A1-O55)- fitted to one page, and then convert the sheet to manual calculations (and this sheet only). Well the print part runs perfectly, then I get stuck on the last line with an error 438- Object doesn't support this property or method.

The purpose of this calc- when I add a sheet (via macro) to the workbook, the formulas in it should automatically calculate- then once I hit the print button, they should all *freeze* and not update unless someone hits the button in the calculation menu. This is to prevent updates if a previous reference is changed. Each new sheet should go to manual calcs once it's been printed.

Ideas? Thanks

Code:
Sub Print_Sheet()


    ActiveSheet.PageSetup.PrintArea = "$A$1:$O$55"
    Application.PrintCommunication = False
    With ActiveSheet.PageSetup
        .PrintTitleRows = ""
        .PrintTitleColumns = ""
    End With
    Application.PrintCommunication = True
    ActiveSheet.PageSetup.PrintArea = "$A$1:$O$55"
    Application.PrintCommunication = False
    With ActiveSheet.PageSetup
        .LeftHeader = ""
        .CenterHeader = ""
        .RightHeader = ""
        .LeftFooter = ""
        .CenterFooter = ""
        .RightFooter = ""
        .LeftMargin = Application.InchesToPoints(0.7)
        .RightMargin = Application.InchesToPoints(0.7)
        .TopMargin = Application.InchesToPoints(0.75)
        .BottomMargin = Application.InchesToPoints(0.75)
        .HeaderMargin = Application.InchesToPoints(0.3)
        .FooterMargin = Application.InchesToPoints(0.3)
        .PrintHeadings = False
        .PrintGridlines = False
        .PrintComments = xlPrintNoComments
        .PrintQuality = 600
        .CenterHorizontally = False
        .CenterVertically = False
        .Orientation = xlPortrait
        .Draft = False
        .PaperSize = xlPaperLetter
        .FirstPageNumber = xlAutomatic
        .Order = xlDownThenOver
        .BlackAndWhite = False
        .Zoom = False
        .FitToPagesWide = 1
        .FitToPagesTall = 1
        .PrintErrors = xlPrintErrorsDisplayed
        .OddAndEvenPagesHeaderFooter = False
        .DifferentFirstPageHeaderFooter = False
        .ScaleWithDocHeaderFooter = True
        .AlignMarginsHeaderFooter = True
        .EvenPage.LeftHeader.Text = ""
        .EvenPage.CenterHeader.Text = ""
        .EvenPage.RightHeader.Text = ""
        .EvenPage.LeftFooter.Text = ""
        .EvenPage.CenterFooter.Text = ""
        .EvenPage.RightFooter.Text = ""
        .FirstPage.LeftHeader.Text = ""
        .FirstPage.CenterHeader.Text = ""
        .FirstPage.RightHeader.Text = ""
        .FirstPage.LeftFooter.Text = ""
        .FirstPage.CenterFooter.Text = ""
        .FirstPage.RightFooter.Text = ""
    End With
    Application.PrintCommunication = True
    'ActiveSheet.PrintOut
    ActiveSheet.Calculation = xlCalculationManual
    
End Sub
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Calculation is application based, not worksheet. You'd have to use the code
Code:
Application.Calculation = xlCalculationManual
but this would prevent all formulae within your workbook to not update.

I'd suggest copying the entire sheet that you've printed and convert all cells to values. This way calculation can remain active but the values on the relevant sheet will not update.
 
Upvote 0
Hmm. So ideas on maybe a better approach? Each day is a new worksheet- each worksheet has a couple of formulas that reference a first sheet. I basically want all of the formulas on any given sheet to freeze when the sheet is printed (and thereafter closed out) but if someone needs to go back in and modify inputs, a “recalculate” button can be used to rerun formulas on that sheet alone. Maybe there’s a better approach? Maybe I should convert all formulas to a macro, then the recalculate would rerun the macro, right? And the values spitted out wouldn’t update because the macro is a one shot deal, not looping.
 
Upvote 0

Forum statistics

Threads
1,214,383
Messages
6,119,198
Members
448,874
Latest member
Lancelots

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top