Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to Save without the Save Message | Excel Discussion (Misc queries) | |||
"Save" macro problem, still prompted to save when closing workbook (?) | Excel Programming | |||
Totally Disabling (^ save ) (Save as) and Save Icon – Which code do I use: | Excel Programming | |||
ASP: Open Excel File with Macro, Allow Macro to run, and then save | Excel Programming | |||
Prompted to save changes after macro save - why? | Excel Programming |