LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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

 
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 07:23 PM.

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"