Class AutoRecover (Excel VBA)

The class AutoRecover represents the automatic recovery features of a workbook.


True if the object is enabled.


Returns the parent object for the specified object. Read-only.


Returns or sets a String value that represents the complete path to where Microsoft Excel will store the AutoRecover temporary files.

Sub SetPath() 
 Application.AutoRecover.Path = "C:\" 
End Sub


Sets or returns the time interval for the AutoRecover object. Permissible values are integers from 1 to 120 minutes. The default value is 10 minutes.

Entering a decimal value will round to the nearest whole number. For example, entering a value of 5.5 is the equivalent of 6. If time values outside the valid range are entered, Microsoft Excel will revert to the previous time value used.

Sub SetTimeValue() 
 Application.AutoRecover.Time = 5 
 MsgBox "The AutoRecover time interval is set at " & _ 
 Application.AutoRecover.Time & " minutes." 
End Sub