LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Looking to save one sheet in a workbook of two sheets...

Hi Jim,

I'm assuming you understand that the best you can do is save a workbook
that contains only a single worksheet. There's no concept of saving a
worksheet object outside a workbook in modern versions of Excel. Given that,
the easiest way to get what you want is to copy the sheet that you want to
save out to a new workbook, then save that workbook. It can be as simple as
the following three lines of code depending on your situation:

Sheet1.Copy
ActiveWorkbook.SaveAs "E:\MySheet.xls"
ActiveWorkbook.Close False

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"Jim Carlock" wrote in message
...
I'm looking for a way to save one worksheet out of a workbook
of two sheets... I don't want the VB modules saved, nor any VB
code, forms, etc.

The Worksheet.SaveAs command doesn't seem to work even
though the help file indicates that it's to save a worksheet (and
I'm strictly keeping a worksheet defined as 1 and only 1
worksheet - rather than the whole work book).

I've thought about creating the worksheet as a seperate file but
before I continue in that direction, I'll ask here.

I've either missed something completely, and saving one and only
one worksheet out of a workbook is a little more complicated
than I've realized.

I'm leaning into seperating the code sheet from the data sheet
right at the moment.

Any advice is appreciated. Thank you.

--
Jim Carlock
http://www.microcosmotalk.com
Feel free to post back to the newsgroup!





 
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
Please help! When I 'save changes' to my workbook/sheet V Excel Discussion (Misc queries) 0 May 18th 09 10:22 PM
Save Sheet as Workbook salonowiec Excel Discussion (Misc queries) 2 June 26th 07 04:03 PM
Select sheet tabs in workbook & save to separate workbook files stratocaster Excel Worksheet Functions 2 March 1st 06 03:35 PM
saving excel with multiple sheets, but won't save to proper sheet jimlead1 Excel Discussion (Misc queries) 0 May 4th 05 06:36 PM
How do I save sheets in a workbook to separate files? Omzala Excel Worksheet Functions 2 January 13th 05 06:23 PM


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