Microsoft KB Archive/193065

= XL97: PasteSpecial Crash with Math Operation & Paste Range Errors =

Article ID: 193065

Article Last Modified on 10/22/2000

-

APPLIES TO


 * Microsoft Excel 97 Standard Edition

-



This article was previously published under Q193065



SYMPTOMS
If you use the PasteSpecial method in Visual Basic for Applications code, you may receive an error similar to one of the following, depending on the operating system you are using:

Windows 95 and Windows 98

This program has performed an illegal operation and will be shut down.

If the problem persists, contact the program vendor.

If you click Details, you receive an error message similar to the following:

EXCEL caused an invalid page fault in module Mso97.dll at 0157:3070867d.

Windows NT 4.0

An application error has occurred and an application log is being generated.

EXCEL.exe

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

-or-

Excel may stop responding.



CAUSE
This problem may occur when the following conditions are true:

 The paste area contains formulas that return #DIV/0!, #NAME?, #NULL!, #NUM!, #REF!, #N/A, or #VALUE! errors. -and-

 You use the PasteSpecial method in Visual Basic for Applications code with any of the Operation arguments of:

- Operation:=xlPasteSpecialOperationAdd

- Operation:=xlPasteSpecialOperationSubtract

- Operation:=xlPasteSpecialOperationMultiply

- Operation:=xlPasteSpecialOperationDivide

This problem may also occur in Microsoft Excel 97 if you use the PasteSpecial Operation argument by using Microsoft Excel 5.0 or Microsoft Excel 95 syntax, such as Operation:=xlAdd.



STATUS
Microsoft has confirmed this to be a problem in Microsoft Excel 97 for Windows.



MORE INFORMATION
The default PasteSpecial Operation argument of xlPasteSpecialOperationNone does not cause this problem.

