recently used files, cleanup

  • Thread starter Patricia Shannon
  • Start date
P

Patricia Shannon

I wanted to remove several files from my recently used files list, so that
the ones I really wanted to keep would be at the top of the list and less apt
to be lost.

Here is a macro that will display the list, and allow each file to be
deleted from the list if desired. The files itself is not deleted. It is
just removed from the recently used file list.

Public Sub EditRecentFiles()
' Created by Patricia Shannon 04/04/2006
' Displays Recently Used files
' Allows selected files to be removed from the list


Dim RecentCntr
Dim NbrRecent
Dim Response

NbrRecent = Application.RecentFiles.Count
MsgBox "Nbr recent files=" & NbrRecent
For RecentCntr = NbrRecent To 1 Step -1
Response = MsgBox("cntr=" & RecentCntr & " " _
& Application.RecentFiles(RecentCntr).Name _
& vbNewLine & "Delete?", vbYesNoCancel + vbDefaultButton2)
Select Case Response
Case vbCancel
GoTo endpgm
Case vbYes
Application.RecentFiles(RecentCntr).Delete
MsgBox "File deleted from recent files list"
End Select
Next RecentCntr

endpgm:
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top