Brian,
I am replying to this after much hesitation. I am assuming you are not a
malicious user.
That is some really dangerous code and I am concerned that it is in a public
newsgroup.
Why would you call the function SimpleSearch when it deletes files?
That is a great way to harm yourself at a later date when you try using the
function
without realizing that there is a bomb in it.
Anyway, since you ask,
You could wrap your code in a loop like this:
Function SimpleSearch(FileTypes As String. Delimter as string)
Dim Extensions() As String, i As Integer
Extensions = Split(FileTypes, Delimiter)
For i = 0 To UBound(Extensions)
' your code
Next i
and call it like this
SimpleSearch (".txt|.ord", "|")
|