If this sounds like you, then Public Sub Add Content To Sheet() Dim start Time As Double start Time = Timer Dim r As Excel. Range("A1: P30") Dim i As Long Dim repeat As Long Dim cell As Excel. Try this out: shrink your Excel workbook window to a smaller size and run the code again. Screen Updating = False Dim start Time As Double start Time = Timer Dim r As Excel. Range("A1: P30") Dim i As Long Dim repeat As Long Dim cell As Excel. Range For repeat = 1 To 30 For Each cell In r cell. Value Mod 2 = 0) Then ' if i is even, color the cell white cell. Range For repeat = 1 To 30 For Each cell In r cell. Value Mod 2 = 0) Then ' if i is even, color the cell white cell. A VBA add-in to quickly insert any of the sample code found on our site directly into the Visual Basic Editor, save your own frequently used code, and more!
is your source for cost-effective Microsoft Excel training.
Sub load Portfolio() Dim i Test As Integer, portfolio Version As String Application. :-) Basically, after all those statements (and between each one) Screen Updating remains "True". Screen Updating = False For i = 1 To 10000 Worksheets("Sheet1"). Screenupdating = False worked perfectly in Excel 2007 until last week, when it remained True however many times I tried to set it to False.
All those Screen Updating = False's you see is called "sheer desperation". I can still enter the workbook and it is screenupdating away even right after the line set it false. Screen Updating = False" in the immediate window it works as expected. Thanks Colin Correct, when you step through in debug mode the screenupdating remains turned on. To test it properly, try this: Put a commandbutton on your sheet and paste in Application. Net) | Coordinates, Vectors and 3D volumes I've experienced this problem, with code that previously worked!
Then comment out the line which turns off screen updating and see what happens; you should find that you scroll down the sheet as the numbers get filled.
Screen Updating = True Try running it and you should see a short pause followed by column A getting filled with numbers.