Returns or sets a Long that determines the number of days that a file must exist in a web (without being modified) before it is classified as older. Once a file is classified as older, it appears in the Older Files view in the Microsoft FrontPage Reports view. Read/write.
expression.OlderFile
expression Required. An expression that returns an Application object.
The following example prompts the user to enter a value that specifies the number of days a file must exist before it is classified as older. The subroutine SetOldVal prompts the user for input, performs a validation on the input data, converts it to the correct type and sets the OlderFile property to the new value. If the value is of an incorrect type, an error message is displayed to the user.
Sub FPOldFile()
'Sets a value that determines how old a file is
Dim objApp As FrontPage.Application
Set objApp = FrontPage.Application
Call SetOldVal(objApp)
End Sub
Sub SetOldVal(ByRef objApp As Application)
'Sets the value that determines how old a file is
Dim varNum As Variant
Dim lngNum As Long
'Prompt the user to enter a value
varNum = InputBox("Enter the number of days a file can exist " &
_ "before it is classified as old.")
'Check to see that the value is of the correct type
If IsNumeric(varNum) Then
'If it's numeric, convert it to Long
lngNum = CLng(varNum)
'Set the OlderFIle value to the new value
objApp.OlderFile = lngNum
'Display the new setting information to the user
MsgBox "The OlderFile value was set correctly." & vbCr & _
"The number of days after which a file becomes old is " _ & lngNum & "."
Else
'Otherwise, display an error message to the user
MsgBox "The input value was incorrect.", vbCritical
End If
End Sub