XL2000: Access Violation Error Running VBA Code with UserForm, SaveCopyAs and Save Functions

Article translations Article translations
Article ID: 264712 - View products that this article applies to.
This article was previously published under Q264712
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

SYMPTOMS

In Microsoft Excel 2000, when you run Visual Basic for Applications code that includes a UserForm object and the SaveCopyAs and Save functions, you may receive the following access violation:
Microsoft Excel xxxx.xls: Excel.exe - Application Error

The instruction at "0xXXXXXXXX" referenced memory at "0xXXXXXXXX".
The Memory could not be "read".

Click OK to terminate the application.
Click CANCEL to debug the application.
Note: This problem does not occur in Microsoft Excel 97.

CAUSE

This error message appears when a UserForm is loaded and the Save method of the workbook is run after the SaveCopyAs method. The SaveCopyAs method sets an invalid value to the "storage" object of a UserForm. Because of this, the Save method cannot re-use the "storage" object of a UserForm. This behavior results in the access violation.

RESOLUTION

To resolve this problem, obtain the latest service pack for Microsoft Office 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
276367 OFF2000: How to Obtain the Latest Office 2000 Service Pack

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Microsoft Office 2000 Service Pack 2.

Properties

Article ID: 264712 - Last Review: October 20, 2013 - Revision: 3.5
APPLIES TO
  • Microsoft Excel 2000 Standard Edition
Keywords: 
kbnosurvey kbarchive kbbug kbdtacode kbfix kboffice2000presp2fix kboffice2000sp2fix kbqfe kbhotfixserver KB264712

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