April 2006
Beginner
1114 pages
98h 16m
English
recentfiles.Add(Name)
Adds a file to the recent-files list. If the file already appears in the recent-files list, the list does not change.
|
Argument |
Settings |
|---|---|
|
|
The path and name of the file to add to the list. Excel does not check that the file exists before it is added to the list. |
The following code updates the recent-files list to make sure all currently open files are included:
Sub UpdateRecentFiles( )
Dim wb As Workbook
For Each wb In Application.Workbooks
Application.RecentFiles.Add wb.FullName
Next
End SubUse the Workbook’s FullName property when adding workbooks to the list so that Excel can set the recent file’s Path property correctly.
Read now
Unlock full access