PC Review


Reply
Thread Tools Rate Thread

Any help is appreciated Creating New files from One File

 
 
JackSmiley
Guest
Posts: n/a
 
      26th Jun 2008
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 With Quote
 
 
 
 
Joel
Guest
Posts: n/a
 
      26th Jun 2008
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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
any help appreciated in creating c# functions for RasEnumConnections and RasHangUp Milsnips Microsoft Dot NET Compact Framework 15 26th Nov 2008 02:46 PM
.PNG+ (Portable Network Graphics Plus) Files - No Support Anymore?? Help Appreciated! Shaun Gupta Windows XP Photos 7 15th Feb 2008 03:19 AM
.PNG+ (Portable Network Graphics Plus) Files - No Support Anymore?? Help Appreciated! Shaun Gupta Windows XP General 2 14th Feb 2008 10:00 AM
Creating a Dynamic .XLS file from two other .XLS files =?Utf-8?B?TWF0dF9QUQ==?= Microsoft Excel Misc 1 9th Oct 2006 10:40 AM
Creating xp bootable partition help appreciated mark Windows XP General 4 18th Sep 2004 09:10 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:51 PM.