Excel screen updating false
Hi, I recall from VB/VBA that, when working with forms, you could switch the screen updating off when performing some long process and then switch it back on again, the point being that the code would run faster as it didn't have to keep re-drawing the form - also the app's appearance would be better as you wouldn't be left with a 'half-drawn' form image as the processing was being carried out. Cheers Pete I don't see anything in the Forms class about this.
You could probably do something like disable the form (using . Forms has two methods that can be used in tandem: Suspend Layout() and Resume Layout()Suspend Layout suppress multiple Layout events while you adjust multiple attributes of the control.
Sub Screen Test() ' ' time screenrefresh ' Dim i As Long Dim t Start As Double Dim t End As Double Dim t Screen On As Double Dim t Screen Off As Double With Application . Screen Updating = False t Start = Micro Timer For i = 1 To 10000 .
Enable = false), update it's contents, and re-enable it. For example, you could call the Suspend Layout method, then set the Size, Location, Anchor, or Dock properties of the control, and then call the Resume Layout method to allow the changes to take effect.
Or you could probably use the traditional Win API method.
Calculate Next i t End = Micro Timer t Screen On = (t End - t Start) End With Msg Box "Off " & Int((t Screen Off) * 1000) & _ " On " & Int(t Screen On * 1000) & _ " Diff " & Int((t Screen On - t Screen Off) * 1000) & " Millisecs" End Sub I think what has happened is that Excel 2013 is still doing all the work to update and format the values, but has added a check to limit the frequency of requests to Windows to actually repaint the screen.
See Also: Speed Up Code If you record Excel macros, as apposed to writing them, you will often wish to stop the screen flicker caused by your macro selecting cells and Worksheets.