Turn Auto recalculation off during macro execution

D

dhstein

I'd like to turn off auto recalc at the beginning of the macro then turn it
back on at the end. How can I do that? Thanks for any help on this.
 
D

dhstein

Luke,

I clicked "YES" before I checked this solution - thinking it would work.
But it doesn't work. I have Excel 2007 - could that be the problem? Thanks.

David
 
D

dhstein

OK - it looks like it does work - sorry about that . But part of my macro is
saving a file so I think recalculation happens in that case - even if it's
turned off - at least that seems to be what's going on.
 
L

Luke M

Try adding these lines then as well:
Application.CalculateBeforeSave = False
'and
Application.CalculateBeforeSave = True
 
G

Gord Dibben

Add this which you would find if you recorded a macro whilst making the
calculation option changes.

With Application
.Calculation = xlManual
.CalculateBeforeSave = False
End With

........do your file saving

Application.Calculation = xlCalculationAutomatic


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top