ScreenUpdating and making Sheets Visible - flicker?

  • Thread starter Gordon Smith \(eMVP\)
  • Start date
G

Gordon Smith \(eMVP\)

(the "eMVP" means I'm an MVP for the "embedded" group - not excel)

I have some code which hides or unhides 4 sheets and works fine. However, I
am seeing too much happening on the screen when I unhide. What am I doing
wrong?

Code:
Application.ScreenUpdating = False

Sheets("Sheet2").Visible = True
Sheets("Sheet3").Visible = True
Sheets("Sheet4").Visible = True
Sheets("Sheet5").Visible = True

Application.ScreenUpdating = True

If I'm turning "ScreenUpdating" off, why am I seeing a brief image of each
sheet as it becomes visible? It's very quick - but noticable.

Thanks
 
G

Guest

Hi Gordon,
I'm no MVP but I tried this code and the screen doesn't flicker at all. Not
a bit. For a test, I changed the code a little to make it easier to test (the
sheets names are in French).
' *****************************************
Sub ScreenUpdatingTest()
Application.ScreenUpdating = False
If Sheets("Feuil2").Visible = True Then
Sheets("Feuil2").Visible = False
Sheets("Feuil3").Visible = False
Sheets("Feuil4").Visible = False
Sheets("Feuil5").Visible = False
Else
Sheets("Feuil2").Visible = True
Sheets("Feuil3").Visible = True
Sheets("Feuil4").Visible = True
Sheets("Feuil5").Visible = True
End If
Application.ScreenUpdating = True
End Sub
' *****************************************
I do not see what the trouble could be. Maybe your processor is overloaded
with unfinished tasks?
Hope someone else can help you out.
Good luck.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top