Potresti fare una cosa come questa:
codice:
Dim n As Long
Dim s As String
Dim path As String

path = "C:\test\"

Do
   s = path & Format$(n, "000000") & ".txt
   If Dir$(s) = "" Then Exit Do
   n = n + 1
Loop

MsgBox "Il prossimo file: " & s
Il problema è che se trova un buco nella numerazione si inserisce con quel numero, ti va bene lo stesso?