PC Review


Reply
Thread Tools Rate Thread

Background Processes in File Save versus File SaveAs

 
 
Paige
Guest
Posts: n/a
 
      24th Apr 2008
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 With Quote
 
 
 
 
James Snell
Guest
Posts: n/a
 
      24th Apr 2008
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 With Quote
 
Paige
Guest
Posts: n/a
 
      24th Apr 2008
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: SaveAs dialog changes file-name to save Ronnie Vernon MVP Windows Vista File Management 0 18th Mar 2008 06:29 PM
How can I make File->Save , File->SaveAs Menu disabled? Zoo Microsoft Excel Programming 4 5th Jun 2006 06:58 AM
Save and Saveas Greyed out on tool bar and file menu Shareena Howley Microsoft Excel Setup 1 5th Jul 2005 01:02 PM
background file processes driving me crazy =?Utf-8?B?ZG1fc2hhZGU=?= Windows XP General 2 14th Nov 2004 05:36 PM
using SaveAs to save 'only' one sheet from one book to a new file =?Utf-8?B?UmFuZHkgVw==?= Microsoft Excel Programming 2 12th Jan 2004 08:21 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:56 AM.