Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,069
Default how do I delete documents from the recent doccument box(excel)

how do I delete documents from the recent doccument box(excel)
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default how do I delete documents from the recent doccument box(excel)

You can't delete individual documents, but if you want to clear the list,
use Tools/ Options/ General, and set Recently used file list to zero
entries. You can then set it back to a non-zero number to let it start a
new list.
--
David Biddulph

"john" wrote in message
...
how do I delete documents from the recent doccument box(excel)



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default how do I delete documents from the recent doccument box(excel)

This works ok for me in xl2003--but I've never tested it in xl2007.

Option Explicit
Sub testme()

Dim iCtr As Long
Dim MRUMax As Long
Dim TestStr As String

With Application.RecentFiles
MRUMax = .Maximum
For iCtr = .Count To 1 Step -1
TestStr = ""
On Error Resume Next
TestStr = Dir(.Item(iCtr).Path)
On Error GoTo 0
If TestStr = "" Then
.Item(iCtr).Delete
End If
Next iCtr
.Maximum = MRUMax
End With

End Sub


If you're new to macros:

Debra Dalgleish has some notes how to implement macros he
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)

john wrote:

how do I delete documents from the recent doccument box(excel)


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default how do I delete documents from the recent doccument box(excel)

Ps. That code deletes names of files that don't exist.

john wrote:

how do I delete documents from the recent doccument box(excel)


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default how do I delete documents from the recent doccument box(excel)

Further to David's suggestion.

Sub toggle_MRU()
With Application
.RecentFiles.Maximum = 1 'leaves current workbook on list
End With
With Application
.RecentFiles.Maximum = 5
End With
End Sub


Gord Dibben MS Excel MVP

On Wed, 16 Dec 2009 05:52:07 -0000, "David Biddulph" <groups [at]
biddulph.org.uk wrote:

You can't delete individual documents, but if you want to clear the list,
use Tools/ Options/ General, and set Recently used file list to zero
entries. You can then set it back to a non-zero number to let it start a
new list.


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
How to delete Excel 2007 file from list under Recent Documents GPS Excel Discussion (Misc queries) 5 May 9th 23 11:47 AM
how do i delete a file from recent documents file in excel exile New Users to Excel 1 March 7th 09 01:59 AM
delete recent documents history in word and excel 2007 ted Excel Discussion (Misc queries) 1 August 22nd 08 02:02 PM
How to delete items from Excel recent documents list Charles 38 Excel Discussion (Misc queries) 2 August 11th 08 06:51 PM
How do I delete items out of my "recent documents" list? susan carroll Excel Discussion (Misc queries) 2 August 17th 07 06:52 PM


All times are GMT +1. The time now is 11:18 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"