Solved

xlcalculationmanual in VBa

Posted on 2011-03-23
7
1,043 Views
Last Modified: 2012-06-22
Dear Experts,

I would like to have a good example website to show how it will have code speed advantage
for Application.Calculation = xlCalculationManual and Application.Calculation = xlCalculationAutomatic
I know those functionality but I wonder what situation we will use it individually  for speed ?

Aud during file save, Is it all formula in Excel sheet will be updated even I set it xlCalculationManual ?

Please advise

Thanks
Duncan l
0
Comment
Question by:duncanb7
  • 3
  • 3
7 Comments
 
LVL 20

Expert Comment

by:pari123
ID: 35199402
Hi,
if you search in experts-exchange, you can find good articles about this. THere is also a write-up on C Pearson's site.

Here's the link - http://www.cpearson.com/excel/optimize.htm

From my experience, the advantage to set it xlCalculationManual is if when your data is huge and there are a lot of formulas.

If the  xlCalculationManual is set to manual, it won't update on file save.

Let me know if you need any further clarifications,

Thanks,
Ardhendu
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 35201760
I think formulas are recalculated before save

Saqib
0
 
LVL 13

Author Comment

by:duncanb7
ID: 35217957
If recaulation before save ,So it might not help me if my VBA code needs to do open file and save file for automation looping 100 files.

THe function might be good when you are doing a VB code debugging or doing a code for sepcifiy sheet from that you
don't want to recaulate other sheets since other sheets value is not important at this moment

AM i right ?

Please advise

Duncan
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 20

Expert Comment

by:pari123
ID: 35218094
Hi Duncan,

If you use the following code -

Private Sub Workbook_Open()
Application.Calculation = xlCalculationManual

Application.CalculateBeforeSave = False
End Sub

Open in new window


then this doesn't recalculate while saving.

Application.CalculateBeforeSave = Values are True or False. If calculation is Manual and CalculateBeforeSave is true when you Save the workbook it will be recalculated.
0
 
LVL 13

Author Comment

by:duncanb7
ID: 35218169
Dear  pari123,

Thanks for your suggestion ?

But my question, even I don't know

In what situation, xlcalcaulteManual is good for speed optimization  ? or what Is said above is correct  
(THe function might be good when you are doing a VB code debugging or doing a code for sepcifiy sheet from that you
don't want to recaulate other sheets since other sheets value is not important at this moment )

In what situation, Application.CalculateBeforeSave = False,is good for speed optimization  ?




0
 
LVL 20

Accepted Solution

by:
pari123 earned 500 total points
ID: 35218237

>> In what situation, Application.CalculateBeforeSave = False,is good for speed optimization  ?

As I mentioned before, it would really make a difference if you have a file with huge volume of data and a lot of formulas. It really differs from sheet to sheet. Say for example, more than 1000 rows of data and 3 columns have formulas in it...so there are 3 * 1000 = 3000 formulas that excel needs to calculate would obivously slow down editing the spreadsheet.

but without looking at the data, you need to make an educated guess on it...
0
 
LVL 13

Author Closing Comment

by:duncanb7
ID: 35221956
Thanks for your reply,
It understood more
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Find out what you should include to make the best professional email signature for your organization.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now