View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Dana DeLouis Dana DeLouis is offline
external usenet poster
 
Posts: 947
Default how do I remove an item from the recently used files list

I cannot find a way to remove one file from the list of recently used files

It's indexed, so you start from the bottom up...

Sub TestIt()
MRU_FileRemove ("Book1.xlsm")
End Sub

Sub MRU_FileRemove(filename As String)
Dim j As Long
Dim s As String

With Application
If .RecentFiles.Maximum = 0 Then Exit Sub
For j = .RecentFiles.Count To 1 Step -1
s = Dir(.RecentFiles.Item(j).Path)
If StrComp(s, filename, vbTextCompare) = 0 Then
.RecentFiles.Item(j).Delete
Exit Sub
End If
Next j
End With
End Sub

- -
HTH :)
Dana DeLouis


"Sandy MCP" wrote in message
...
I cannot find a way to remove one file from the list of recently used files
drop down in office. Is there a way? This is Office 2007, excel and word.
Thanks
--
SkM MCP