#1   Report Post  
Posted to microsoft.public.excel.programming
QB QB is offline
external usenet poster
 
Posts: 57
Default SaveAs?

I need to save copy of a workbook under diferrent names...

I currently am using the SaveAs method but this switches to the newly
created file and I would like to remain within the original file. How can
this be done.

Also, is it possible to create these copies without copying the vba in the
main file, just the worksheet data?

Thank you for the help,

QB
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default SaveAs?

--Have you tried Activeworkbook.SaveCopyAs

--If you are using 2007 save as .xlsx

If this post helps click Yes
---------------
Jacob Skaria


"QB" wrote:

I need to save copy of a workbook under diferrent names...

I currently am using the SaveAs method but this switches to the newly
created file and I would like to remain within the original file. How can
this be done.

Also, is it possible to create these copies without copying the vba in the
main file, just the worksheet data?

Thank you for the help,

QB

  #3   Report Post  
Posted to microsoft.public.excel.programming
Ray Ray is offline
external usenet poster
 
Posts: 267
Default SaveAs?

The FileCopy command should help you do what you need ... press F1 in
the VBE and then search for FileCopy. You can change the name of the
file multiple times if you need. Note, however, that attempting to
copy a file that's currently open will result in an error.

On your 2nd question, I'm sure that searching the forums for some
variation of 'delete VBA' will provide many solutions ...

ray
  #4   Report Post  
Posted to microsoft.public.excel.programming
QB QB is offline
external usenet poster
 
Posts: 57
Default SaveAs?

Thank you for pointing me to this method. I will take a look.

QB





"Jacob Skaria" wrote:

--Have you tried Activeworkbook.SaveCopyAs

--If you are using 2007 save as .xlsx

If this post helps click Yes
---------------
Jacob Skaria


"QB" wrote:

I need to save copy of a workbook under diferrent names...

I currently am using the SaveAs method but this switches to the newly
created file and I would like to remain within the original file. How can
this be done.

Also, is it possible to create these copies without copying the vba in the
main file, just the worksheet data?

Thank you for the help,

QB

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default SaveAs?

You can look at .savecopyas in vba's help.

But that saves an identical version of the current state of the workbook --
including code.

You could remove the code (if all the security settings are ok) using techniques
from Chip Pearson's site:
http://www.cpearson.com/excel/vbe.aspx

If you share with others, you may find it easier to create a new workbook, copy
the data (formulas or values or both) to the new workbook and then save that.

Maybe even have a template that has all the layouts of each sheet (page setup,
filters, freeze panes, ...) and create a new workbook based on that template
(which has no code).

Then save that after you've copied what you want into it.

QB wrote:

I need to save copy of a workbook under diferrent names...

I currently am using the SaveAs method but this switches to the newly
created file and I would like to remain within the original file. How can
this be done.

Also, is it possible to create these copies without copying the vba in the
main file, just the worksheet data?

Thank you for the help,

QB


--

Dave Peterson
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
saveas ActiveWorkbook.SaveAs Filename:=Range("A1").Value DarrenL Excel Programming 4 April 18th 09 07:54 AM
SaveAs Arnie Excel Programming 6 October 21st 08 03:56 PM
VBA SaveAs Value charlie Excel Discussion (Misc queries) 4 August 27th 07 11:33 PM
SaveAs brownti via OfficeKB.com Excel Programming 3 February 28th 07 04:33 PM
Using the SaveAs in VBA caldog Excel Programming 2 October 5th 05 01:05 AM


All times are GMT +1. The time now is 01:41 AM.

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"