Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cell("filename") doesn't update to new filename when do save as. | Excel Worksheet Functions | |||
VBA - Save with New Filename | Excel Programming | |||
save as different filename | Excel Programming | |||
Save Filename | Excel Programming | |||
save as filename | Excel Programming |