Cell formulas & ScreenUpdating property...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all,

Quick question on the ScreenUpdating property of Excel. I have been working on an Excel VBA project where I set the ScreenUpdating = False, so as to both speed up calculations & to prevent the screen from flickering as I add & delete worksheets & charts programatically...

Recently, I have inserted some formulas into cells programatically using the .Cells.Formula property... I noticed that doing this (programatically inserting formulas into cells) seems to "prevent" the ability to set the ScreenUpdating property to False... Is that true???

No matter how many times I set the ScreenUpdating property to False, it doesn't seem to work after I insert the formulas... Is this a bug? Is there a fix? Or am I doing something wrong?

Does anybody have any suggestions or comments on what I can do to fix this?

Thank you very much in advance,

blc
 
I tried the following code

Sub Foo(
Range("A1:A2").Clea
For i = 1 To 1
newHour = Hour(Now()
newMinute = Minute(Now()
newSecond = Second(Now()) +
waitTime = TimeSerial(newHour, newMinute, newSecond
Application.Wait waitTim
Range("A1").Value =
If i = 5 The
Range("A2").Formula = "=Sum(A1)
Application.ScreenUpdating = Fals
End I
Nex
Application.ScreenUpdating = Tru
End Su

And it stopped updating the screen when I set it to false. Could you post your code? Maybe there's something else going on

-Brad
 
Thank you for your reply. I will try your solution (i.e. setting screen updating to false AFTER I insert the code)..

blc
 
Back
Top