XL97: Implicitly Setting Value of Range Object Crashes Excel

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

SYMPTOMS

When you run a Microsoft Visual Basic for Applications macro, you may receive an error message similar to the following:
EXCEL caused an invalid page fault in module <unknown> at 0000:000006ff.
-or-
An application error has occurred and an application log is being generated.

EXCEL.exe

Exception: access violation(0xc0000005), Address: 0x307de830

CAUSE

This problem may occur when the following conditions are true:
  • The Visual Basic procedure contains a line of code that implicitly sets the value of a Range object, as in the following example:

    Range("A1") = 123
    -and-

  • You have installed Oleaut32.dll version 2.30.4265.1 or later.

    NOTE: Microsoft has confirmed that the following programs install Oleaut32.dll version 2.30.4265.1 or later:

    • Microsoft Visual Basic version 6.0
    • Microsoft Data Access Components (MDAC) version 2.0 Service Pack 2
    • OLE Automation Fix for Windows 98

RESOLUTION

To correct this problem, download and install the latest update for Excel 97. The latest update includes this and all other Excel-specific updates that have been released since the latest service release (SR) of Office. The files included in this update will be included in any later SR or patch. To upgrade to the latest patch or for more information about the history of Excel 97 patches, please click the article number below to view the article in the Microsoft Knowledge Base:
232652 XL97: Overview and History of Excel Patches
NOTE: This patch is designed to update Microsoft Excel 97 Service Release 2 (SR-2).

WORKAROUND

Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs.
If you have limited programming experience, you may want to contact a Microsoft Certified Partner or Microsoft Advisory Services. For more information, visit these Microsoft Web sites:

Microsoft Certified Partners - https://partner.microsoft.com/global/30000104

Microsoft Advisory Services - http://support.microsoft.com/gp/advisoryservice

For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS
To temporarily work around this problem, use the Value property when you set the value of a Range object. The following example illustrates how to do this:

Range("A1").Value = 123

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Properties

Article ID: 221568 - Last Review: October 20, 2013 - Revision: 2.2
APPLIES TO
  • Microsoft Excel 97 Standard Edition
Keywords: 
kbnosurvey kbarchive kbbug kbdtacode kbfix KB221568

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