Screen updating and formulas

  • Thread starter Thread starter John
  • Start date Start date
J

John

With Excel and VBA, as soon as you add a formula to a cell this updates the
screen. Does anyone know a way around this?

E.g..

with Application
.Screenupdating = False
.range("a1").Formula ="=sum(a2:a4)"
.range("b1").Formula ="=sum(b2:b4)"

In the example above the screen updates after adding in the formula to cell
"A1"

Any ideas from anyone would be appreciated.
 
John said:
With Excel and VBA, as soon as you add a formula to a cell this updates the
screen. Does anyone know a way around this?

E.g..

with Application
.Screenupdating = False
.range("a1").Formula ="=sum(a2:a4)"
.range("b1").Formula ="=sum(b2:b4)"
....

Try .Calculation = xlCalculationManual after disabling screen updating to
turn off automatic recalculation as well, then where you re-enable screen
updating, add .Calculation = xlCalculationAutomatic and .CalculateFull .
 
I can't reproduce that behavior:

Sub Tester1()
With Application
.ScreenUpdating = False
.Range("a1").Formula = "=sum(a2:a4)"
.Range("b1").Formula = "=sum(b2:b4)"
MsgBox "Screen Updated?, No I think "
.ScreenUpdating = True
End With
End Sub

the screen is not updated until the macro ends.
 
Back
Top