"Not enough memory" error when you add chart to workbook (168650)
The information in this article applies to:
- Microsoft Excel 97 for Windows
This article was previously published under Q168650 Important This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base: 256986 Description of the Microsoft Windows Registry SYMPTOMS
When you attempt to add a new chart to a workbook or access the chart data source, you may receive the following error message:
Not enough memory.
If you are using a Microsoft Visual Basic for Applications macro to add chart sheets to a workbook, you may also receive the following error message:
Run-time error '1004':
Method 'Add' of object 'Sheets' failed
CAUSE
This problem may occur if you add more than 124 charts to a workbook when
editing the workbook in Microsoft Excel 97 or Microsoft Excel 97 Service Release 1 (SR-1).
Note that the problem may occur when you add fewer than 124 charts, especially if you use multiple fonts in worksheets in your workbook
or if you use embedded charts. Also, note that if the workbook contains
charts that have been added in earlier versions of Microsoft Excel, the
workbook may contain more than 124 charts.
RESOLUTION
To correct this problem when creating new charts, obtain Microsoft Excel 97 Service Release 2 (SR-2) and
perform the following steps.
Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk. NOTE: Because there are several versions of Microsoft Windows, the following steps may be different on your computer. If they are, see your product documentation to complete these steps.
To resolve the problem, you can add an entry to the registry that disables
automatic font scaling for charts. To do this:
- Quit all running programs.
- Click the Start button, and then click Run.
- In the Open box, type regedit, and
then click OK.
- Go to the following registry subkey (folder):
HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Excel\Microsoft Excel - Point to New on the Edit menu, and then click String Value. Type AutoChartFontScaling, and then press
ENTER.
- Click Modify on the Edit menu. Type 0, in the Value Data box, and then click OK.
- Click Exit on the File menu to quit the Registry Editor.
The next time that you start Excel, you should be able to create more
than 124 charts.
If you are unable to obtain Microsoft Excel 97 SR-2, you may be able to
work around this limitation by using either of the following methods.
Method 1: Turn Off the Auto Scale Option for Fonts in Your Charts- Select the chart area.
- On the Format menu, click Selected Chart Area.
- Select the Font tab.
- Click to clear the Auto scale check box.
- Click OK.
Method 2: Move Charts into Another Workbook
You may also be able to work around this limitation by moving some of the
charts in your workbook into another workbook. Note that charts moved to another workbook remain linked to the data in the original workbook.
NOTE: If you remove embedded charts from a worksheet and add additional charts, the "Not enough memory" error message appears unless you first save, close, and then reopen the workbook. If you delete chart sheets or worksheets that contained embedded charts, you can then add new charts up to the limit without receiving the error message and without saving,
closing, and then reopening the file.
STATUS
Microsoft has confirmed this to be a problem in Microsoft Excel 97 for
Windows. This problem was corrected in Microsoft Office 97 Service Release
2 (SR-2).
For additional information about SR-2, please click the article number below to view the article in the Microsoft Knowledge Base:
Q151261 OFF97: How to Obtain and Install MS Office 97 SR-2
Modification Type: | Minor | Last Reviewed: | 12/7/2004 |
---|
Keywords: | kbbug kbchart kberrmsg KB168650 |
---|
|