Thread: Save as Macro
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
dustinbrearton via OfficeKB.com dustinbrearton via OfficeKB.com is offline
external usenet poster
 
Posts: 46
Default Save as Macro

Sure it is possible. Will it still take a long time to save that many files?
Yeah. You can use a for next and just have your for next variable added to
the end of base file name, say File was your base you could just say File1,
File2, File3.

Try something like this.


Sub OpenThis()

Dim worksheet_filepath As String
Dim x As Integer


Application.ScreenUpdating = False


worksheet_filepath = "C:\Temp\Temp"

Workbooks.Open Filename:= _
worksheet_filepath & "test.xls"




For x = 1 To 20
ActiveWorkbook.SaveAs worksheet_filepath & "\Test" & x & ".xls", xlNormal
Next

Application.ScreenUpdating = True

End Sub


nhollingdale wrote:
Hi,
I am trying to produce a macro that will open a workbook in Excel and save
it as something else, but i would like to do this 150 times, i.e. 150
uniquely named workbooks. is it possible to create this?

Thanks
Nicola


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200808/1