Microsoft KB Archive/928988

= Error message when you run a VBA macro to adjust the charts on an Excel 2007 worksheet: &quot;Run-time error '16': Expression too complex&quot; =

Article ID: 928988

Article Last Modified on 10/15/2007

-

APPLIES TO


 * Microsoft Office Excel 2007

-



SYMPTOMS
When you run a Microsoft Visual Basic for Applications (VBA) macro to adjust the charts on a Microsoft Office Excel 2007 worksheet, you receive the following error message:

Run-time error '16':

Expression too complex



WORKAROUND
To work around this issue, add the following code to your VBA macro. Add this example code before the code that retrieves the inside plot area of the chart.

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure. However, they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. Application.ScreenUpdating = true Chart.Refresh DoEvents



MORE INFORMATION
For more information about the plot area, follow these steps:
 * 1) On the Visual Basic Editor Help menu, click Microsoft Visual Basic Help.
 * 2) In the Search box, type plotarea, and then click Search.

Additional query words: excel2007 excel2k7 excel12 xl2007 xl2k7 xl12 kbNoOfficeAlertID

Keywords: kberrmsg kbtshoot kbmacro kbchart kbprogramming kbautomation kbprb kbvba kbexpertiseinter KB928988

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.