FIX: "Out of Virtual Memory" message may occur when you open and close many workbooks with controls in Excel 2000 (248180)



The information in this article applies to:

  • Microsoft Excel 2000

This article was previously published under Q248180

SYMPTOMS

While working in Microsoft Excel, available virtual memory decreases and you may experience one or more of the following symptoms:
  • A slowdown in computer performance

  • "Out of Virtual Memory" messages

  • Microsoft Excel may stop responding (hang)

CAUSE

These problems occur when the following conditions are true:
  • You open and close one or more workbooks a large number of times.

    -and-

  • The workbooks contain one or more ActiveX or OCX controls.

    -and-

  • You do not restart Excel.
-or-
  • You insert OLEObject controls repeatedly using a Microsoft Visual Basic for Applications macro, for example:
       Sub Insert_OLEObject()
          For x = 1 To 100
             Workbooks.Add
             ActiveSheet.OLEObjects.Add(ClassType:="Forms.ListBox.1", _
             Link:=False, DisplayAsIcon:=False, Left:=150, Top:=100, _
             Width:=72, Height:=72).Select
             ActiveWorkbook.Close savechanges:=False
          Next x
       End Sub
    						
    -and-

  • You do not restart Excel.

RESOLUTION

To resolve this problem, obtain Microsoft Office 2000 Service Release 1/1a (SR-1/SR-1a).

To obtain SR-1/SR-1a, click the article number below to view the article in the Microsoft Knowledge Base:

245025 How to obtain and install Microsoft Office 2000 Service Release 1/1a (SR-1/SR-1a)

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. This problem was corrected in Microsoft Office 2000 SR-1/SR-1a.

MORE INFORMATION

When you open a workbook that contains an ActiveX/OCX control, the Excel process acquires a minimum of 20 private bytes of memory. Excel does not release this memory when it closes a workbook, but only releases it when Excel quits. The amount of the private memory leak can be greater, depending on which ActiveX/OCX control(s) you use in a workbook.

You can observe this behavior within Microsoft Windows NT Performance Monitor, Windows System Information tool, or another similar tool that measures available virtual memory.

The amount of time before errors occur depends on the amount of memory available and the amount of memory that the controls on each workbook use.

Modification Type:MajorLast Reviewed:10/6/2004
Keywords:kbPerformance kbstoprespond kbbug kbfix KB248180