I have this macro that is working well but it runs upon opening the workbook. What would I need to change to get this to happen as the user closes the model instead of as it opens?
Private Sub Workbook_Open()
Application.ScreenUpdating = False
'Turns Workbook to Auto Calc as it opens
Application.Calculation = xlCalculationAutomatic
Application.CalculateBeforeSave = True
'Hide Administrator Calculation Rows
On Error Resume Next
Sheets("Input").Rows("8:199").EntireRow.Hidden = True
Sheets("Input").Rows("532:1027").EntireRow.Hidden = True
Sheets("Input").Rows("467:515").EntireRow.Hidden = True
On Error GoTo 0
'Protect each sheet as it opens
Sheets("Results").Select
Range("A1").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Sheets("Input").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Application.ScreenUpdating = True
Range("A1").Select
End Sub
Thanks,
RR
Bookmarks