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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Save Exel worksheet as a workbook ? 1

Status
Not open for further replies.
Oct 23, 2002
57
0
0
US
Just a question here. Is it possible to have a workbook and take one of its sheets and save that sheet as another, seperate workbook. What I am looking at is a workbook with numerous sheets that the users can fill in, once filled we need to save that filled in sheet as its own seperate workbook. Is that possible and if so what processes would be involved ?


Reponses are welcomed ! Thanks in advance !
 
Yes, quite simply:

activesheet.copy
activeworkbook.save "MyNewFilename.xls"
activeworkbook.close

This creates, then saves and closes, the new workbook consisting of just the one sheet (the active sheet in your existing workbook).
Rob
[flowerface]
 
THANKS, for the direction and code. It's greatly appreciated !!! You've got a star from me.
 
If you have little sheets - just right-click the sheet's tab, select '"Move or copy', and select new workbook from the workbook list (see if checkbox 'make copy' is unchecked).
Another way is to set workbook's window (not excel's) state to normal and drag page's tab onto excel's desktop.

It can be a problem with links between sheets if you too early close workbooks, without updating all links.

If you need code to separate sheets:

[tt]Sub SeparateSheets()
With ThisWorkbook
For i = .Sheets.Count To 2 Step -1
.Sheets(i).Move
Next i
End With
End Sub[/tt]

Assumed that you placed this code in normal module and have no hidden or 'very hidden' pages.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top