Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding new workbook!
Hi all!
A quick question. I wanted to add a new workbook(book1 is default) and copy all th columns/rows from the existing workbook (vtec.sls) to the new one. After that I would like to manipulate the new workbook(book1), withou changes to the original one and I would like to do this multipl times. I.e., the next workbook to be added would be book3 and then book 4 an so on.... But before book3 is added, book2 has to be closed withou saving the changes. I was wondering how to implement this using macros and would appreciat any help guys. Thanks alot. Arun... Vtec corp -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding new workbook!
a couple of examles on how to do it once.
You would need to repeat code for multiple times or inclose in a FO loop Sub Macro1() Dim wsData As Worksheet Set wsData = ActiveSheet Workbooks.Add wsData.Cells.Copy ActiveSheet.Paste 'your manipulation code here ActiveWindow.Close savechanges:=False End Sub Sub Macro2() Dim wsData As Worksheet Set wsData = ActiveSheet Workbooks.Add wsData.Copy Befo=ActiveWorkbook.Sheets(1) 'your manipulation code here ActiveWindow.Close savechanges:=False End Su -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Adding values from different workbook | Excel Discussion (Misc queries) | |||
Adding over 30 worksheets in a workbook | New Users to Excel | |||
Adding a chart to large workbook brings workbook activity to a hal | Excel Discussion (Misc queries) | |||
Adding tabs to a workbook. | Excel Discussion (Misc queries) | |||
Adding sheets to workbook | Excel Worksheet Functions |