Geoff,
if that works - great.
Being picky-picky, the only thing I'd like to see changed here is this
bit:
If InStr(1, rKeyWord, "[F00000000]") Then
Application.RecentFiles(X).Delete
End If
If InStr(1, rKeyWord, "[F00000002]") Then
Application.RecentFiles(X).Delete
End If
In the unlikely event of both those IFs being true (I know, I know -
very unlikely), then both IFs would try to delete a file - but they'd be
_different__files..
How about combining the above 6 lines into one IF (There's no need for
*End If*s if there's only one action to undertake):
If InStr(rKeyWord, "[F00000000]") or InStr(rKeyWord, "[F00000002]")
Then Application.RecentFiles(X).Delete
(and I've taken out the *1*s from the -Instr- functions -
not needed)
BTW, where did you post before - where the thread 'dried up'?
--
p45cal
*p45cal*
------------------------------------------------------------------------
p45cal's Profile:
http://www.thecodecage.com/forumz/member.php?userid=558
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=147510