View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default How to enable / disable re-calculation option?

Dim CalcMode as long

calcmode = application.calculation
application.calculation = xlCalculationManual
'your code here
application.calculation = calcmode

This actually saves the current calculation mode, changes (or keeps) it to
manual, then changes it back to what it was when you started.

Eric wrote:

I would like to disable re-calculation option during running my macro.
Does anyone have any suggestions on how to add code to enable / disable
re-calculation option?
Thanks in advance for any suggestions
Eric

For example
Sub mymacro

' I would like to disable re-calculation option here

Macro's coding

' I would like to enable re-calculation option here
End Sub


--

Dave Peterson