Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dow Dow is offline
external usenet poster
 
Posts: 31
Default Save As Filename

I have looked through every post I could find related to this and I am
not seeing what I need. I hope someone will be able to help me.

I have written a combination of macros that make some format changes
to a workbook then add some formulas and finally I get a finished
product.

Halfway through the macros I want to insert code or another macro that
will save the workbook at that point, with it's current name, to a
fixed location, and then continue working to finish the rest of the
formulas and equations. I will save the finished product with a
different name in a different location.

I can then use the originally saved file with the formating done up to
that point for something else.

Does anyone have any thoughts on how to do this? I have been looking
at getfilesaveas and a number of other things but I am not able to
make them work for what I want.

Thanks as always.

Dow.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Save As Filename

You need to perform the saveas and then open the original workbook back up

set bk1 = activeworkbook
'get pathaname of original file
bkname = bk1.fullname

'make c hange to original workbook

'save changes as new workbook.
bk1.saveas filename:="c:\temp\book2.xls"
'the original workbook is closed during the saveas

'open original workbook without modifications
'modifications got saved as in new book
set bk2 = workbooks.open(filename:=bkname)


"Dow" wrote:

I have looked through every post I could find related to this and I am
not seeing what I need. I hope someone will be able to help me.

I have written a combination of macros that make some format changes
to a workbook then add some formulas and finally I get a finished
product.

Halfway through the macros I want to insert code or another macro that
will save the workbook at that point, with it's current name, to a
fixed location, and then continue working to finish the rest of the
formulas and equations. I will save the finished product with a
different name in a different location.

I can then use the originally saved file with the formating done up to
that point for something else.

Does anyone have any thoughts on how to do this? I have been looking
at getfilesaveas and a number of other things but I am not able to
make them work for what I want.

Thanks as always.

Dow.


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
Cell("filename") doesn't update to new filename when do save as. Louis Excel Worksheet Functions 2 March 22nd 07 07:27 PM
VBA - Save with New Filename Louise Excel Programming 2 October 13th 06 01:59 PM
save as different filename Tom Excel Programming 3 May 4th 05 03:41 AM
Save Filename Peter Excel Programming 3 February 4th 05 01:15 PM
save as filename Geo Siggy[_14_] Excel Programming 3 April 6th 04 01:26 PM


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

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

About Us

"It's about Microsoft Excel"