Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default How to save a worksheet in a project as a SEPARATE FILE

I have, as part of a project, a print form I want to save as a separate file
without losing focus on the original. Can anyone help?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 135
Default How to save a worksheet in a project as a SEPARATE FILE

On May 5, 12:12*pm, vbnewbie
wrote:
I have, as part of a project, a print form I want to save as a separate file
without losing focus on the original. Can anyone help?


I'm not exactly sure how you want the data to be copied, but there is
sample code below of how to copy the active sheet to a new workbook
and open the save as dialog box to save the newly created workbook.

Best,

Matthew Herbert

Sub SaveWorksheet()
Dim Wks As Worksheet
Dim wksCopy As Worksheet
Dim Wkb As Workbook
Dim strFileName As String

Set Wks = ActiveSheet
Set Wkb = Workbooks.Add

'copy the worksheet to a new workbook
Wks.Copy After:=Wkb.Sheets(Wkb.Sheets.Count)

'save the file
strFileName = Application.GetSaveAsFilename()
If strFileName Then
Wkb.SaveAs strFileName
End If

End Sub
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default How to save a worksheet in a project as a SEPARATE FILE

What's a "print form" ?

To do what your subject line implies, simply

ActiveSheet.Copy

This will create a new file, save it as required, and close it.

Regards,
Peter T

"vbnewbie" wrote in message
...
I have, as part of a project, a print form I want to save as a separate
file
without losing focus on the original. Can anyone help?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default How to save a worksheet in a project as a SEPARATE FILE

This should get you started:
http://www.rondebruin.nl/copy6.htm

Post back if you have specific questions.

HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Peter T" wrote:

What's a "print form" ?

To do what your subject line implies, simply

ActiveSheet.Copy

This will create a new file, save it as required, and close it.

Regards,
Peter T

"vbnewbie" wrote in message
...
I have, as part of a project, a print form I want to save as a separate
file
without losing focus on the original. Can anyone help?




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default How to save a worksheet in a project as a SEPARATE FILE



"ryguy7272" wrote:

This should get you started:
http://www.rondebruin.nl/copy6.htm

Post back if you have specific questions.

HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Peter T" wrote:

What's a "print form" ?

To do what your subject line implies, simply

ActiveSheet.Copy

This will create a new file, save it as required, and close it.

Regards,
Peter T

"vbnewbie" wrote in message
...
I have, as part of a project, a print form I want to save as a separate
file
without losing focus on the original. Can anyone help?






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default How to save a worksheet in a project as a SEPARATE FILE

Ryan

Really Useful - Thankyou! my problem is no longer a problem

Cheers

Pete

"ryguy7272" wrote:

This should get you started:
http://www.rondebruin.nl/copy6.htm

Post back if you have specific questions.

HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Peter T" wrote:

What's a "print form" ?

To do what your subject line implies, simply

ActiveSheet.Copy

This will create a new file, save it as required, and close it.

Regards,
Peter T

"vbnewbie" wrote in message
...
I have, as part of a project, a print form I want to save as a separate
file
without losing focus on the original. Can anyone help?




Reply
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
How do I save part of a worksheet in a separate file? cleo Excel Worksheet Functions 3 May 15th 07 01:26 AM
Save filtered data as a separate file Gazza Excel Programming 1 January 30th 07 06:26 PM
Can I auto save to a separate file?(not the file I am working in) Jim Lynch Setting up and Configuration of Excel 1 August 14th 06 05:20 PM
Cannot save Project file as MS Access file Jumpinjackflash Excel Discussion (Misc queries) 1 January 11th 06 11:35 PM
How to save each sheet as a separate excel-file Audio_freak Excel Programming 4 January 4th 04 08:56 PM


All times are GMT +1. The time now is 06:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"