Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here's the screnario: Only 1 file is open; it has formulas, but they have
all been calculated. There is no before_save (or before_close) code. When I do file/save from the menu (and also from VB), Excel does not do a recalculation; however, when I do file/save as from the menu (and also if I do it from VB and even if I use Application.Calculation = xlCalculationManual before the saveas command), it does a recalculation. 3 questions: 1) Why does it act differently between file/save and file save as? 2) Why is my Application.Calculation = xlCalculationManual command being ignored? 3) How can I force it to NOT recalculate during saveas? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
1) The short answer is that Save and Save As are different code paths. The
same applies in most of the other office applications by the way. Useful to remember if you have a troublesome document or workbook. 2) It is not being ignored. Many things which are derived from the file content are discarded to ensure the saved file is clean, the result cache is one of these items. To save the result cache it must be regenerated. 3) You cannot. But you could move the SaveAs - One option might be to do your SaveAs at the beginning of your code (or when you need to call the recalc) and then Save at the end. "Paige" wrote: Here's the screnario: Only 1 file is open; it has formulas, but they have all been calculated. There is no before_save (or before_close) code. When I do file/save from the menu (and also from VB), Excel does not do a recalculation; however, when I do file/save as from the menu (and also if I do it from VB and even if I use Application.Calculation = xlCalculationManual before the saveas command), it does a recalculation. 3 questions: 1) Why does it act differently between file/save and file save as? 2) Why is my Application.Calculation = xlCalculationManual command being ignored? 3) How can I force it to NOT recalculate during saveas? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks James! Like your option re saving the file also; will definitely use
this. "James Snell" wrote: 1) The short answer is that Save and Save As are different code paths. The same applies in most of the other office applications by the way. Useful to remember if you have a troublesome document or workbook. 2) It is not being ignored. Many things which are derived from the file content are discarded to ensure the saved file is clean, the result cache is one of these items. To save the result cache it must be regenerated. 3) You cannot. But you could move the SaveAs - One option might be to do your SaveAs at the beginning of your code (or when you need to call the recalc) and then Save at the end. "Paige" wrote: Here's the screnario: Only 1 file is open; it has formulas, but they have all been calculated. There is no before_save (or before_close) code. When I do file/save from the menu (and also from VB), Excel does not do a recalculation; however, when I do file/save as from the menu (and also if I do it from VB and even if I use Application.Calculation = xlCalculationManual before the saveas command), it does a recalculation. 3 questions: 1) Why does it act differently between file/save and file save as? 2) Why is my Application.Calculation = xlCalculationManual command being ignored? 3) How can I force it to NOT recalculate during saveas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Confused here Prevent Saving File - but allow ONLY File SAVEAS Met | Excel Discussion (Misc queries) | |||
How can I make File-Save , File-SaveAs Menu disabled? | Excel Programming | |||
What are hidden processes of SaveAs function | Excel Programming | |||
Save and Saveas Greyed out on tool bar and file menu | Setting up and Configuration of Excel | |||
using SaveAs to save 'only' one sheet from one book to a new file | Excel Programming |