Turn off autocalculate in VBA

  • Thread starter Thread starter Me
  • Start date Start date
M

Me

I have a large spreadsheet that I import a text file into
and then parse some data with. The larger it gets, the
slower it gets. All this is understandable but one of the
things that seems to slow it down is the recalculation of
fields within the sheet. How can I turn this off and on
using VBA?
 
Hi
use
Application.Calculation = xlCalculationManual
and
Application.Calculation = xlCalculationAutomatic
 
Application.Calculation = xlCalculateManual
Application.CalculateBeforeSave = True

Application.Calculation = xlCalculationAutomatic

HTH

Erin
 
You can put this statement before the code:

Application.Calculation = xlCalculationManual

'code, code, code

'And then:

Application.Calculation= xlCalculationAutomatic

tod
 

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

Back
Top