Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
Adding values from different workbook Rich Excel Discussion (Misc queries) 0 May 7th 09 04:53 PM
Adding over 30 worksheets in a workbook -E New Users to Excel 4 December 30th 08 06:11 PM
Adding a chart to large workbook brings workbook activity to a hal Dale Excel Discussion (Misc queries) 6 December 29th 08 05:50 PM
Adding tabs to a workbook. computerkiller Excel Discussion (Misc queries) 4 September 26th 07 01:27 PM
Adding sheets to workbook Susan Excel Worksheet Functions 4 October 23rd 06 05:55 PM


All times are GMT +1. The time now is 05:19 AM.

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

About Us

"It's about Microsoft Excel"