JLRodgers Level: Moderator
 Registered: 04-04-2002 Posts: 1617
|
Re: saving files Archived to Disk
Following could be helpful
' ----START MACRO ----
Private Sub SaveMacro()
Dim i As Integer
Dim str As String
Do
i = i + 1
' str = <path>Pic1.xls to <path>Pic10000.xls
' ThisWorkbook.Path is the current path of the workbook
str = ThisWorkbook.Path & "Pic" & CStr(i) & ".xls"
' Bbefore file is saved there is NO path set default here
If Left(str, 1) = "" Then str = "G:" & str
If Dir(str) = "" Then
ThisWorkbook.SaveAs str
str = "<FS>"
End If
Loop Until i >= 32000 Or str = "<FS>"
End Sub
' ---- END MACRO ----
|