P
Patricia Shannon
I discovered that my recently used files macro, which allows the user to
delete unwanted files from the recently used files list, which shows up when
you click File, decreased the max nbr of recent files that will be saved.
This contains a correction which sets the max to 9, which is the absolute max
for Excel 2003.
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 As Long
Dim NbrRecent As Long
NbrRecent = Application.RecentFiles.Count
MsgBox "Nbr recent files=" & NbrRecent
For RecentCntr = NbrRecent To 1 Step -1
Select Case MsgBox("cntr=" & RecentCntr & " " _
& Application.RecentFiles(RecentCntr).Name _
& vbNewLine & "Delete?", vbYesNoCancel + vbDefaultButton2)
Case vbCancel
GoTo endpgm
Case vbYes
Application.RecentFiles(RecentCntr).Delete
MsgBox "File deleted from recent files list"
Case vbNo
' Do nothing
Case Else
' Do nothin
End Select
Next RecentCntr
Application.RecentFiles.Maximum = 9
endpgm:
End Sub
delete unwanted files from the recently used files list, which shows up when
you click File, decreased the max nbr of recent files that will be saved.
This contains a correction which sets the max to 9, which is the absolute max
for Excel 2003.
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 As Long
Dim NbrRecent As Long
NbrRecent = Application.RecentFiles.Count
MsgBox "Nbr recent files=" & NbrRecent
For RecentCntr = NbrRecent To 1 Step -1
Select Case MsgBox("cntr=" & RecentCntr & " " _
& Application.RecentFiles(RecentCntr).Name _
& vbNewLine & "Delete?", vbYesNoCancel + vbDefaultButton2)
Case vbCancel
GoTo endpgm
Case vbYes
Application.RecentFiles(RecentCntr).Delete
MsgBox "File deleted from recent files list"
Case vbNo
' Do nothing
Case Else
' Do nothin
End Select
Next RecentCntr
Application.RecentFiles.Maximum = 9
endpgm:
End Sub