Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Network Files creating temporary files Dave Weastec Excel Discussion (Misc queries) 0 October 3rd 08 02:26 PM
CREATING PDF FILES FROM EXCEL FILES NSNR Excel Discussion (Misc queries) 2 January 31st 08 06:39 AM
Creating a Dynamic .XLS file from two other .XLS files Matt_PQ Excel Discussion (Misc queries) 1 October 9th 06 10:40 AM
how to default WritePassword under excel workbook property for any files as long as those files are the offsprings of the parent file George Excel Programming 0 October 5th 06 04:14 PM
creating an XLS file from " files" data in a Folder Edwin Mashiringwani Excel Discussion (Misc queries) 2 November 19th 05 04:45 PM


All times are GMT +1. The time now is 04:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"