Share via


Application.FileLoadLast Method

Project Developer Reference

Opens one of the last nine most recently used files.

Syntax

expression.FileLoadLast(Number)

expression   A variable that represents an Application object.

Parameters

Name Required/Optional Data Type Description
Number Optional Integer A number from 1 to 9 that specifies which of the nine most recently used files to open.

Return Value
Boolean

Example
The following example opens the nine most recently used files. It assumes the "Recently Used File List" option has been selected.

Visual Basic for Applications
  Sub OpenThe9MRUFiles()
Dim I As Integer    ' Index used in For...Next loop

For I = 1 To 9
    <strong class="bterm">FileLoadLast</strong> I
    ' Ignores errors that may be due to missing files.
    On Error Resume Next
Next I

End Sub

See Also