XL97: PasteSpecial Crash with Math Operation & Paste Range Errors

ID: Q193065


The information in this article applies to:
  • Microsoft Excel 97 for Windows


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.


REFERENCES

For more information about the PasteSpecial method, from the Visual Basic Editor, click the Office Assistant, type PasteSpecial, click Search, and then click to view "PasteSpecial Method (Range Object)."

NOTE: If the Assistant is hidden, click the Office Assistant button on the Standard toolbar. If the Assistant is not able to answer your query, please see the following article in the Microsoft Knowledge Base:

Q176476 OFF: Office Assistant Not Answering Visual Basic Questions

Additional query words: XL97 ipf paste special

Keywords : kbdta xlgpf
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: October 30, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.