ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copying EVERYTHING from one workbook to another (https://www.excelbanter.com/excel-programming/339012-copying-everything-one-workbook-another.html)

schoujar[_9_]

Copying EVERYTHING from one workbook to another
 

Hi,

Okay this is a slightly detailed query.

I have a template workbook used for making rosters. It has 2 worksheets
and a few modules containing a few macros each.

Now what I am trying to do is create a "Roster Generator" workbook. In
this the user enters a "start date" and "number of weeks". Then i want
to be able to create a new workbook which takes the template roster
sheets, modules and the macros from the template workbook.

I have figured out how to do the date manipulation and all but what i
can't work out is how to copy EVERYTHING(not just data) from one
workbook to another, whether the source workbook is closed or open.

Any suggestions?

Sahil


--
schoujar
------------------------------------------------------------------------
schoujar's Profile: http://www.excelforum.com/member.php...o&userid=26574
View this thread: http://www.excelforum.com/showthread...hreadid=401381


PY & Associates[_4_]

Copying EVERYTHING from one workbook to another
 
Filename$ = "test.xls"
ActiveWorkbook.SaveAs Filename$

"schoujar" wrote:


Hi,

Okay this is a slightly detailed query.

I have a template workbook used for making rosters. It has 2 worksheets
and a few modules containing a few macros each.

Now what I am trying to do is create a "Roster Generator" workbook. In
this the user enters a "start date" and "number of weeks". Then i want
to be able to create a new workbook which takes the template roster
sheets, modules and the macros from the template workbook.

I have figured out how to do the date manipulation and all but what i
can't work out is how to copy EVERYTHING(not just data) from one
workbook to another, whether the source workbook is closed or open.

Any suggestions?

Sahil


--
schoujar
------------------------------------------------------------------------
schoujar's Profile: http://www.excelforum.com/member.php...o&userid=26574
View this thread: http://www.excelforum.com/showthread...hreadid=401381




All times are GMT +1. The time now is 08:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com