0
votes

When running the code below the screen flickers quite badly. This only seems to happen in Office 2016. In Office 2010 and on Mac with Office 2016 there is no flicker at all. Can anyone guide me?

I have tried umpteen variations to this but nothing seems to get rid of the flickering. I have even wrapped the call to this sub with updating false and true but no luck.

Public Sub applyLogosToDashboard()

Application.ScreenUpdating = False

If Not Application.OperatingSystem Like "*Mac*" Then

    Sheets("Dashboard").Activate
    Sheets("Dashboard").Unprotect Password:=Sheets("Logos").Range("IV1")
    ActiveSheet.Shapes("Apple_Logo").Visible = False
    ActiveSheet.Shapes("Win_Logo").Visible = True
    ActiveSheet.Shapes("Button_Insert_Logo").Visible = True
    ActiveSheet.Shapes("Button_Print_PDF").Visible = True
    ActiveSheet.Shapes("Button_Save_As").Visible = True
    ActiveSheet.Shapes("Button_Help").Visible = True
    ActiveSheet.Shapes("Button_Versions").Visible = True
    Sheets("Logos").Protect Password:=Sheets("Dashboard").Range("IV1"), DrawingObjects:=True, Contents:=True, Scenarios:=True

Else

    Sheets("Dashboard").Activate
    Sheets("Dashboard").Unprotect Password:=Sheets("Dashboard").Range("IV1")
    ActiveSheet.Shapes("Apple_Logo").Visible = True
    ActiveSheet.Shapes("Win_Logo").Visible = False
    ActiveSheet.Shapes("Button_Insert_Logo").Visible = False
    ActiveSheet.Shapes("Button_Print_PDF").Visible = False
    ActiveSheet.Shapes("Button_Save_As").Visible = False
    Sheets("Dashboard").Protect Password:=Sheets("Dashboard").Range("IV1"), DrawingObjects:=True, Contents:=True, Scenarios:=True

End If

    Application.ScreenUpdating = True

End Sub

It is important to note that the routine is executed by a button on my home sheet. During the first execution after open the flickering occurs. If I click on the button after without shutting down then there is no flicker.

2

2 Answers

1
votes

I have resolved the problem my moving the function to the end of the sub that was launching it. It is now the last function executed before End Sub. There is no longer any flicker at all.

0
votes

i had a similar issue with screen problems in office 2016 i solved it by disabling hardware acceleration:

To disable hardware acceleration, follow these steps: Start any Office program. On

  • On the File tab, click Options.
  • In the Options dialog box, click Advanced.
  • In the list of available options, click to select the Disable hardware graphics acceleration check box. ...
  • Click OK.

This is from MSDN :

https://support.microsoft.com/en-gb/help/2768648/display-issues-in-office-client-applications