Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default save worksheet as new workbook

Is there a way to save just one worksheet as a new workbook

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default save worksheet as new workbook

dreamer,
Right click on that sheet's tab, select "Move or Copy", select "New Book",
check "Create a copy" if desired. Voila.
If you run the macro recorder whilst you do that, you'll have a good idea of
the code required.

(Assuming you're not trying to do this with a file from a mixed language
network: See the thread ""Path/File Access Error" on Sheets.Copy" below.)

NickHK

"dreamer " wrote in message
...
Is there a way to save just one worksheet as a new workbook?


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default save worksheet as new workbook

Not directly. You could loop round and delete all the others except, and the
SaveAs.

Application.DisplayAlerts = False
For Each sh In Activeworkbook
If sh.name < "mySheet" Then
sh.Delete
End If
Next Sh
Application.DisplayAlerts = True

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"dreamer " wrote in message
...
Is there a way to save just one worksheet as a new workbook?


---
Message posted from http://www.ExcelForum.com/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default save worksheet as new workbook


"Bob Phillips" wrote in message
...
Not directly. You could loop round and delete all the others except, and

the
SaveAs.


Activesheet.copy would appear a pretty direct means of generating a new
workbook containing (only) the desired sheet.

---
Regards
Norman


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default save worksheet as new workbook

But that is still not directly

Bob

"srgggf" <jbkjkbjn wrote in message
...

"Bob Phillips" wrote in message
...
Not directly. You could loop round and delete all the others except, and

the
SaveAs.


Activesheet.copy would appear a pretty direct means of generating a

new
workbook containing (only) the desired sheet.

---
Regards
Norman






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default save worksheet as new workbook

Hi Bob,

Indeed the Activesheet.Copy command directly creates a new single-sheet
workbook.

I suspect that you have confused this direct creation with a subsequent
(optional) save.

In any event, the looping deletion of other sheets method which you suggest
seems inappropiately lengthy in operation and overly verbose code.
Certainly, were I dealing with (say) a 100-sheet primary workbook, I know
which approach I would adopt.

Just my opinion of course.

---
Regards,
Norman.


"Bob Phillips" wrote in message
...
But that is still not directly

Bob

"srgggf" <jbkjkbjn wrote in message
...

"Bob Phillips" wrote in message
...
Not directly. You could loop round and delete all the others except,

and
the
SaveAs.


Activesheet.copy would appear a pretty direct means of generating a

new
workbook containing (only) the desired sheet.

---
Regards
Norman






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default save worksheet as new workbook

I know what Activesheet.Copy does, but direct in my parlance would be
something like

SaveSheetAs filename

which doesn't exist. Deleting may be more lengthy, but both methods have to
create the target before saving. Hence, neither is direct, so guess what, I
am not confusion direct with a subsequent save.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"srgggf" <jbkjkbjn wrote in message
...
Hi Bob,

Indeed the Activesheet.Copy command directly creates a new single-sheet
workbook.

I suspect that you have confused this direct creation with a subsequent
(optional) save.

In any event, the looping deletion of other sheets method which you

suggest
seems inappropiately lengthy in operation and overly verbose code.
Certainly, were I dealing with (say) a 100-sheet primary workbook, I know
which approach I would adopt.

Just my opinion of course.

---
Regards,
Norman.


"Bob Phillips" wrote in message
...
But that is still not directly

Bob

"srgggf" <jbkjkbjn wrote in message
...

"Bob Phillips" wrote in message
...
Not directly. You could loop round and delete all the others except,

and
the
SaveAs.

Activesheet.copy would appear a pretty direct means of generating

a
new
workbook containing (only) the desired sheet.

---
Regards
Norman








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
Save Worksheet as new workbook with specifics Tel Excel Discussion (Misc queries) 0 June 26th 09 12:13 PM
Save Worksheet To Master Workbook Bobzter100 Excel Discussion (Misc queries) 5 March 12th 09 01:55 AM
(DAVE PETERSON) - SAVE WORKSHEET AS A NEW WORKBOOK Gator Girl Excel Worksheet Functions 6 October 21st 08 08:14 PM
How do I save a worksheet within a workbook? jester Excel Discussion (Misc queries) 1 August 7th 06 10:54 PM
Save Worksheet vs Workbook Terry Excel Worksheet Functions 1 January 6th 06 05:31 PM


All times are GMT +1. The time now is 02:19 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"