Forum Discussion
How can a remove these files from the 'Recent' list?
Thanks Guy. That gets rid of them, but then I can't see any recent workbooks. I want to be able to see some, just not those that no longer exist.
Right click -> Remove from list shall work
- Tim ShilesOct 09, 2017Copper Contributor
Thanks Sergei. I've tried that: no luck!
- SergeiBaklanOct 09, 2017Diamond Contributor
Tim,
Strange. Just tested - created new workbook, saved it on my OneDrive. Closed Excel, opened again, in backstage in Recent remove that file from the list. Closed and opened again - no this file in the list.
Will it work in your environment with new file if you repeat? Are old files pinned?
- Tim ShilesOct 09, 2017Copper Contributor
Hi Sergei. This has been solved by a user on another forum. I ran this code:
Sub Clear_Dead_Files()
Dim i As Long
On Error Resume Next
OriginalMax = Application.RecentFiles.Maximum
Application.RecentFiles.Maximum = 50
For i = Application.RecentFiles.Count To 1 Step -1
If Dir(Application.RecentFiles(i).Name) = "" Then
Application.RecentFiles(i).Delete
End If
Next
Application.RecentFiles.Maximum = OriginalMax
End Sub