Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help exporting worksheets/data to a workbook.

I am trying to determine the most effective way to accomplish this
goal...

I have a workbook with 5 worksheets each of which pulls data from
various locations and some manipulations made. I am trying to export
2 sheets that are generated as a workbook with a time-date stamp as
the file name.

I am trying to figure out if it is best to create the workbook from
code and copy the sheets or open an existing workbook, write the data
and "save as."

Any help, insight, and code snippets would be greatly appreciated.


Additionally, I am looking for a good resource for excel object
definitions (with proper use of properties and methods)


TIA!!!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Help exporting worksheets/data to a workbook.

Here's one way. Select the worksheets to copy.

Sub NewWB()

ActiveWorkbook.Windows(1).SelectedSheets.Copy
ActiveWorkbook.SaveAs FileName:=Format(Now, _
"mmddyyyy hhmmss")

End Sub

HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------

I am trying to determine the most effective way to accomplish this
goal...

I have a workbook with 5 worksheets each of which pulls data from
various locations and some manipulations made. I am trying to export
2 sheets that are generated as a workbook with a time-date stamp as
the file name.

I am trying to figure out if it is best to create the workbook from
code and copy the sheets or open an existing workbook, write the data
and "save as."

Any help, insight, and code snippets would be greatly appreciated.


Additionally, I am looking for a good resource for excel object
definitions (with proper use of properties and methods)


TIA!!!


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Help exporting worksheets/data to a workbook.

Worksheets(Array("Sheet3","Sheet5")).Copy

creates a new workbook containing a copy of Sheet3 and Sheet5.

--
Regards,
Tom Ogilvy

<Tbird wrote in message ...
I am trying to determine the most effective way to accomplish this
goal...

I have a workbook with 5 worksheets each of which pulls data from
various locations and some manipulations made. I am trying to export
2 sheets that are generated as a workbook with a time-date stamp as
the file name.

I am trying to figure out if it is best to create the workbook from
code and copy the sheets or open an existing workbook, write the data
and "save as."

Any help, insight, and code snippets would be greatly appreciated.


Additionally, I am looking for a good resource for excel object
definitions (with proper use of properties and methods)


TIA!!!



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
Summarise data from several worksheets in a workbook Denis Excel Discussion (Misc queries) 2 June 29th 09 12:26 AM
Getting data from different worksheets in another workbook [email protected] Excel Discussion (Misc queries) 1 August 14th 07 11:14 AM
Exporting certain cells to new workbook Smokes Excel Discussion (Misc queries) 0 March 21st 06 08:11 PM
How do I sort data from various worksheets in the same workbook i. Evelyne Excel Worksheet Functions 4 April 1st 05 06:57 PM
Linking Data between worksheets in a workbook Terry Excel Worksheet Functions 2 November 8th 04 01:04 PM


All times are GMT +1. The time now is 04:00 AM.

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"