Name

Application.RecentFiles([index])

Synopsis

Returns the RecentFiles collection. RecentFiles represents the list of recently used files displayed at the bottom of the File menu. For example, the following code displays the path- and filenames for each file in the Recent Files list:

Sub TestRecentFiles(  )
    Dim f As RecentFile
    For Each f In Application.RecentFiles
        Debug.Print f.Path
    Next
End Sub

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.