![]() |
Any help is appreciated Creating New files from One File
I have a file that i have added a control that allows the user to
change criteria and recalculate the worksheet. I have developed the code that loops through all the scenarios I enter and prints each one. What I really want to do is loop through these scenarios and then instead of printing, create a new separate file, then keep moving through the loop and creating new files Thanks in advance |
Any help is appreciated Creating New files from One File
try this
from for RowCount = 1 to 10 Rows(RowCount).Printout next RowCount to set Oldsht = activeworkbook.activesheet for RowCount = 1 to 10 set newbk = Workbooks.add Oldsht.Rows(RowCount).Copy _ Destination:=newbk.Rows(1) newbk.saveas filename:="abc"&RowCount&".xls" activeworkbook.close next RowCount "JackSmiley" wrote: I have a file that i have added a control that allows the user to change criteria and recalculate the worksheet. I have developed the code that loops through all the scenarios I enter and prints each one. What I really want to do is loop through these scenarios and then instead of printing, create a new separate file, then keep moving through the loop and creating new files Thanks in advance |
All times are GMT +1. The time now is 04:11 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com