Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Patricia Shannon
 
Posts: n/a
Default recently used files, more efficient

Public Sub EditRecentFiles()
' Created by Patricia Shannon 04/04/2006
' Displays Recently Used files
' Allows selected files to be removed from the list
' This is a little more efficient than the other one.
' Doesn't matter so much in this little macro, but I wanted to replace the
other one to set a good example for those learning VBA


Dim RecentCntr
Dim NbrRecent
Dim Response
Dim HoldRecentFile As RecentFile

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

endpgm:
End Sub
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
recently used files, cleanup Patricia Shannon Excel Discussion (Misc queries) 0 April 4th 06 11:19 PM
Sharing read-write Excel 2003 files ttt8262 Excel Discussion (Misc queries) 0 April 1st 06 09:39 PM
Recently used files Nabs Excel Worksheet Functions 5 December 4th 05 06:34 PM
Recently Used File List - 2002 Contains 'Temp' Files Keith972002 Excel Discussion (Misc queries) 0 July 26th 05 01:46 PM
how to clear the recently used files and still keep settings to k. Coco Excel Discussion (Misc queries) 2 December 6th 04 08:41 PM


All times are GMT +1. The time now is 04:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"