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.