Dear Mick,
you can use the "FileExist(FileName)" (see the helpfile)
e.g. in your example
FileName="test"
suffix=".txt"
If FileExist(FileName & Suffix) = true Then FileName=FileName & "2"
... and then save the text as FileName & Suffix
all the best / Björn
Last edited by BjornF : 01-03-2008 at 10:22 PM.
|