How to disable formulas in a sheet

  • Thread starter Thread starter paritoshmehta
  • Start date Start date
P

paritoshmehta

Hi,

I have an excel file that has a lot of formulas in it which consume
lot of memory / cpu usage while processing!!!

The problem is that I recently inserted a macro in it which pastes dat
from one sheet to the one where processing happens and so excel freeze
while executing the macro!!

I was wondering if there is a way I can disable some formulas so that
can run the code (the code runs absolutely fine without the formulas
and then enable them???

Thanks for any help possible!
 
Hi
change your macro like the following:
sub foo()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
'.... Dein Code
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
end sub

You may also manually turn-off autocalculation in the menu 'Tools -
Options - Calculation' while your macro runs
 
H
Try geting the macro to set calculation to manual whils copying, and then back to automatic when finished
This would mean only one recalculation was done once all the data has been transferred
KevinJ
 
Turn on or off the workbook calculation

Application.Calculation = xlCalculationManual
call macro
Application.Calculation =xlCalculationAutomatic
 
I was wondering if there is a way I can disable some
formulas

You can set the calculation to manual while the code is
running, like this:

Application.Calculation = xlManual


Then, at the end of your code, set the calcuation back on,
and force calculation. (I think that setting calculation
to automatic doesn't actually trigger the calculation)

Application.Calculation = xlAutomatic
Calculate
 

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