INTELLIGENT WORK FORUMS FOR COMPUTER PROFESSIONALS
Come Join Us!
Are you a Computer / IT professional? Join Tek-Tips now!
- Talk With Other Members
- Be Notified Of Responses
To Your Posts
- Keyword Search
- One-Click Access To Your
Favorite Forums
- Automated Signatures
On Your Posts
- Best Of All, It's Free!
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.
Partner With Us!
"Best Of Breed" Forums Add Stickiness To Your Site

(Download This Button Today!)
Feedback
"...I think the forum is a great idea, especially for those of us in consulting engineering. Keep up the good work!..."
Geography
Where in the world do Tek-Tips members come from?
|
VBA Visual Basic for Applications (Microsoft) FAQ
|
Excel How To
|
How Do I save a sheet seperately from the main workbook?
Posted: 20 Sep 02 (Edited 28 Nov 02)
|
This question comes up fairly regularly. Wherever there are large reports and slow networks, someone will be asked to produce a summary. Most often, the summary sheet is incorporated into the existing workbook and then copied and pasted using the range copy method ie 'Pseudocode Determine range to copy select range copy range open new workbook paste into new workbook save new workbook as summary
I discovered this shortcut whilst answering a question regarding a similar situation and found that you can use the copy worksheet method to great effect. This copies the worksheet in its entirity to a new workbook (automatically)
Hence, some sample code for anyone wanting to save just a single sheet from their large workbook would be :
Sub SaveSingleSheet() sheets("Sheet1").copy activeworkbook.saveas filename:="Enter Path and Name Here" activeworkbook.close end sub
This will copy "Sheet1" to a new workbook, give it a name, save it and close it
Personally I'm chuffed that I found this 'cos it saves time, looks neat and involves less coding than would normally be needed
|
Back to VBA Visual Basic for Applications (Microsoft) FAQ Index
Back to VBA Visual Basic for Applications (Microsoft) Forum |
|
 |
|
Join Tek-Tips® Today!
Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.
Here's Why Members Love Tek-Tips Forums:
Talk To Other Members
- Notification Of Responses To Questions
- Favorite Forums One Click Access
- Keyword Search Of All Posts, And More...
Register now while it's still free!
Already a member? Close this window and log in.
Join Us Close