G
Guest
I am trying to forcefully set the autorecovery option to True for a
particular workbook. I've set the path for recovery, but when I call my
function it keeps stalling at my with statement "With Application.AutoRecover"
The big problem is I cannot find much in the way of help online for
autorecovery.
Sub SetAutoRecoverOptions()
'Set the AutoRecover options for the application
ChangeAutoRecoverSettings True, "\\CCT75-F3-FIL03\GLOBALSHARE01\PMD
PMO\F05 Files\Monthly-Project LE\02+10 Post Act Projects\Project over
$1MM\CIS\", 2
'Make sure this workbook uses them
ActiveWorkbook.EnableAutoRecover = True
End Sub
Function ChangeAutoRecoverSettings(Optional ByVal vEnable As Variant,
Optional ByVal vPath As Variant, Optional ByVal vTime As Variant)
With Application.AutoRecover
'Only set the property if a value was passed
If Not IsMissing(vEnable) Then
'Enable AutoRecover
.Enabled = vEnable
End If
'Only set the property if a value was passed
If Not IsMissing(vPath) Then
'Change the path to a central backup files area
.Path = vPath
End If
'Only set the property if a value was passed
If Not IsMissing(vTime) Then
'Save every AutoRecover file every 2 minutes
.Time = vTime
End If
End With
End Function
particular workbook. I've set the path for recovery, but when I call my
function it keeps stalling at my with statement "With Application.AutoRecover"
The big problem is I cannot find much in the way of help online for
autorecovery.
Sub SetAutoRecoverOptions()
'Set the AutoRecover options for the application
ChangeAutoRecoverSettings True, "\\CCT75-F3-FIL03\GLOBALSHARE01\PMD
PMO\F05 Files\Monthly-Project LE\02+10 Post Act Projects\Project over
$1MM\CIS\", 2
'Make sure this workbook uses them
ActiveWorkbook.EnableAutoRecover = True
End Sub
Function ChangeAutoRecoverSettings(Optional ByVal vEnable As Variant,
Optional ByVal vPath As Variant, Optional ByVal vTime As Variant)
With Application.AutoRecover
'Only set the property if a value was passed
If Not IsMissing(vEnable) Then
'Enable AutoRecover
.Enabled = vEnable
End If
'Only set the property if a value was passed
If Not IsMissing(vPath) Then
'Change the path to a central backup files area
.Path = vPath
End If
'Only set the property if a value was passed
If Not IsMissing(vTime) Then
'Save every AutoRecover file every 2 minutes
.Time = vTime
End If
End With
End Function