Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

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!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

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

My Archive

Close Box

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:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close