There have been dozens of questions about screen flickering in Excel 2013 and 2016, as Application.ScreenUpdating = False
does not work as it used to.
Screen Flickering VBA Excel
Excel ScreenUpdating False and still flickering screen
ScreenUpdating = False fails in Excel 2013 and 2016
One partial solution involves disabling worksheet calculations, but they can be necessary in some models. Another partial solution involves making workbooks invisible, which is either confusing for the user (if all workbooks disappear), or still sees the screen flickering (if you make all workbooks except one disappear).
Ideally, I am looking for a solution that allows DoEvents to be run (so that it doesn't look like Excel is hanged), the allows the StatusBar to be visible (for reporting on progress), and prevents all other screen flicker.
Why can't Microsoft just sort this out :(
Here is some sample code which requires two blank workbooks (Book1 and Book2) and induces a horrible screen flicker.
Sub Macro1()
' this worked fine in Excel 2010
Application.ScreenUpdating = False
' this clears all flicker, but the whole of excel disappears
' Application.Visible = False
' this changes the flicker between Book1 and blank white screen
' Application.Workbooks("Book2").Windows(1).Visible = False
' some flickery code
For i = 1 To 10
Windows("Book2").Activate
Call Jiggle("Red")
Windows("Book1").Activate
Call Jiggle("Yel")
Next i
' restore normality
Application.ScreenUpdating = True
Application.Visible = True
End Sub
Sub Jiggle(c As Variant)
For i = 1 To 100
ActiveCell.Offset(1, 0).Select
If (c = "Yel") Then Selection.Interior.Color = 255
If (c = "Red") Then Selection.Interior.Color = 65535
Next i
End Sub