Private Sub Worksheet_Deactivate()
Application.ScreenUpdating = True
Application.EnableEvents = False
ActiveWindow.DisplayHeadings = False
ActiveSheet.Unprotect Password:="lolo"
Rows("2:10000").RowHeight = 40
Range([a2], Cells(Rows.Count, "a").End(xlUp)).Select
ActiveSheet.Protect Password:="lolo", DrawingObjects:=True, Contents:=True, Scenarios:=True
ActiveSheet.EnableSelection = xlNoRestrictions
ActiveWindow.DisplayHeadings = True
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub