Hey Sid,
It's actually a custom built subroutine used to restore the default states of your environment before you ran your code. Every coder would use most of the same items, but some may omit a few as they don't use certain pieces...
I call my own something different, but you'll get the idea here. In mine, I call Environ_SpeedBooster at the beginning of each major subroutine, and then Environ_RestoreSettings at the end, or after an error forces an exit.
These have been cut directly from one of my projects...
Public xlCalcState As Long
Sub Environ_SpeedBooster()
'Macro created 06/11/2005 22:29 by Ken Puls
'Macro Purpose: To set application properties to maximize speed
xlCalcState = Application.Calculation
With Application
.ScreenUpdating = False
.Calculation = xlCalculationManual
End With
End Sub
Sub Environ_RestoreSettings()
'Macro created 06/11/2005 22:33 by Ken Puls
'Macro Purpose: To restore application properties to user settings
With Application
.ScreenUpdating = True
.Calculation = xlCalcState
.EnableEvents = True
.DisplayAlerts = True
.StatusBar = False
End With
xlCalcState = 0
End Sub
HTH,