Microsoft Knowledge Base

XL: Chart Not Resized Automatically When Legend Moved

Last reviewed: June 4, 1997
Article ID: Q124003
5.00 5.00c 7.00 | 5.00
WINDOWS         | MACINTOSH
kbprg kbcode

The information in this article applies to:

  • Microsoft Excel for Windows, versions 5.0, 5.0c
  • Microsoft Excel for the Macintosh, version 5.0
  • Microsoft Excel for Windows NT, version 5.0
  • Microsoft Excel for Windows 95, version 7.0

SYMPTOMS

In Microsoft Excel, after you create a chart with a legend, or when you add a legend to a chart and then delete or move it, the chart is not automatically resized to fill the entire usable area.

Note that this behavior is different from earlier versions of Microsoft Excel. In earlier versions of Microsoft Excel, the chart is automatically resized to fill in the gap where the legend was previously positioned.

WORKAROUNDS

To work around this problem, use any of the methods below.

Method 1: Resize the chart manually by clicking in the plot area and then

          dragging its border to the desired size.

Method 2: Use an autoformat to reformat the chart. To do this, choose
          Autoformat from the Format menu.

          Note that if you use this method, you may remove the original
          formatting from your chart.

Method 3: To resize the chart in a macro, use the appropriate code
          below:

          To resize the chart to its maximum width
          ----------------------------------------

          ActiveChart.Plotarea.Left = ActiveChart.ChartArea.Left
          ActiveChart.PlotArea.Width = ActiveChart.ChartArea.Width

          To resize the chart to its maximum height
          -----------------------------------------

          ActiveChart.PlotArea.Top = ActiveChart.ChartArea.Top
          ActiveChart.PlotArea.Height = ActiveChart.ChartArea.Height


KBCategory: kbprg kbcode kbusage
KBSubcategory:

Additional reference words: 5.00 re-size 7.00

Keywords : kbcode kbprg
Version : 5.00 5.00c 7.00 | 5.00
Platform : MACINTOSH WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 4, 1997
©1997 Microsoft Corporation. All rights reserved. Legal Notices.