Excel Macro

  • Thread starter Victor & Toni Jo Friedmann
  • Start date
V

Victor & Toni Jo Friedmann

How do I turn off the option that shows each and every cell in a spread
sheet as the macro progresses through its execution? In other words, I don't
want the spread sheet to follow the computations until at the very end. This
should speed up the execution of the macro. In Excel 4 the command was
Echo(false), but I don't know what it is in Visual Basic.

Thanks,

Vic
 
N

Norman Jones

Hi Vic,

Try

Application.ScreenUpdating = False

' Your Code

Application.ScreenUpdating = True
 
J

Jack Schitt

Application.ScreenUpdating = False

In addition, if it is a long macro that does not require recalculation until
the completion of the macro, it is sometimes useful to turn of automatic
calculation at the beginning and restore it at the end:

'at the beginning
Dim lCalculation as long
lCalculation = Application.Calculation
Application.Calculation = xlCalculationManual

'at the end
Application.Calculation = lCalculation

Bare in mind that if you break out of the macro before the end then
calculation will be set to manual, and may require manually resetting to
automatic.
 
V

Victor & Toni Jo Friedmann

Thanks, it worked like a charm.

Vic

Norman Jones said:
Hi Vic,

Try

Application.ScreenUpdating = False

' Your Code

Application.ScreenUpdating = True
 
Top