try this; you may define variables more precisely
Sub SavContinous()
Y = "C:\temp\FileName" ' can be whichever existing folder
For Nr = 1 To 9999
Fname = Y & Nr & ".xls"
Set fs = CreateObject("Scripting.FileSystemObject")
A = fs.FileExists(Fname)
If A = False Then GoTo rutin
Next Nr
rutin:
ActiveWorkbook.SaveAs Filename:=Fname
End Sub
---
Message posted from
http://www.ExcelForum.com/