Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Do I save a sheet seperately from the main workbook?

Excel How To

How Do I save a sheet seperately from the main workbook?

by  xlbo  Posted    (Edited  )
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

Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top