Article ID: 2790615 - View products that this article applies to.
Expand all | Collapse all

Symptoms

When you run Microsoft Visual Basic for Applications (VBA) code in Microsoft Excel 2013, portions of Excel may appear white or gray, depending on your Office Theme. It stays blank until the code completes. This issue may occur if the VBA code performs one or more of the following actions in a macro that runs long enough for the user to see the results before the macro completes:
  • Repeatedly select cells
  • Insert sheets
  • Update or opens task panes
  • Add a workbook

Cause

This issue is caused by the changes that are made in Microsoft Office 2013 to optimize the new graphics engine.

Workaround

  1. Use ScreenUpdating to disable the screen updates of Excel so you do not see the changes while they are disabled. This also may improve your macro performance.
    Application.ScreenUpdating = False
    Workooks.Add
    Application.ScreenUpdating = True
  2. If you need to see the screen changes, insert a DoEvents command after the line in the code that causes the screen to appear white. Using DoEvents sparingly will help maintain macro performance.
    Workbooks.Add
    DoEvents

Status

This is a known lmitation in Excel 2013.

Note: For all versions of Excel, a similar effect can occur in long running macros when Windows turns the application white and marks it not responding. This occurs because Excel is not responding to Windows while the macro is running. DoEvents will also assist in this scenario by allowing Excel to respond to Windows and allow the application screen to recover.


Properties

Article ID: 2790615 - Last Review: February 1, 2013 - Revision: 4.0
Applies to
  • Microsoft Excel 2013
Keywords: 
kbsurveynew kbexpertiseinter kbprb kbtshoot KB2790615

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com