Hello All,
I have come across an annoying problem within Excel 2013. When running a simple macro that unprotects a worksheet other than the currently active worksheet, the screen flickers. Several points to note:
1. I have already set Application.ScreenUpdating = False. While this worked great in Excel 2010 and older, it does not work in Excel 2013. I have tested the same workbook and macro in both 2010 and 2013. 2010 ran flawlessly, while 2013 flickers.
2. The issue only arises when unprotecting a sheet other than the currently active sheet. That is, if I am on Sheet1 and I run a macro unprotecting Sheet2, the screen will flash. However, if I am on Sheet1 and I run a macro unprotecting Sheet1, there is no flash. Again, I did not have this issue in Excel 2010 and older, only 2013.
3. In addition to a screen flicker (small annoyance, but I can deal with this), any command buttons on the sheet disappear momentarily when the flicker occurs.
I have attached a very basic workbook demonstrating this problem. The workbook contains two tabs - "Home" and "Other". The Home tab contains several command buttons. One, labeled "No Flicker", runs a macro that does NOT cause flickering. Another, labeled "Flicker", runs a macro that DOES cause flickering. The only difference between these macros is the name of the sheet that they unprotect. Note that there are two additional command buttons on the "Home" sheet. I added these for illustrative purposes, as they clearly flicker and momentarily disappear when the screen flashes.
The problematic code is as follows:
Sub Flicker()
Application.ScreenUpdating = False
Worksheets("Other").Unprotect
Worksheets("Other").Protect
Application.ScreenUpdating = True
End Sub
I have searched high and low for a solution, but to no avail. Has anyone else encountered this? Does anyone have a solution? Thank you!
Bookmarks