View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Can VBA be used to clear the recently used file list?

HiQuartz,

If you want to hide the Excel recent file list display, try:

Sub Tester()
Application.DisplayRecentFiles = False
End Sub

If you want to clear and re-initialise the list, try:

Sub Tester02()
With Application
.DisplayRecentFiles = False
.DisplayRecentFiles = True
.RecentFiles.Maximum = 3 '<<==== CHANGE TO SUIT
End With
End Sub

Note that neither of the subs erases the windows recent file list, only
Excel's ability to report the list.

---
Regards,
Norman



"quartz" wrote in message
...
Is is possible using VBA in Excel to clear ALL items in the recently used
file list?
I'm talking about the recently used files when you click "Start" then
"Documents".
If this is possible, could someone please post the code to do this?

Thanks.