Microsoft KB Archive/131558

= SEND.MAIL Used in 5.0 Without Arguments May Cause Error =

Article ID: 131558

Article Last Modified on 8/15/2005

-

APPLIES TO


 * Microsoft Excel 97 Standard Edition
 * Microsoft Excel 95 Standard Edition
 * Microsoft Excel 5.0 Standard Edition

-



This article was previously published under Q131558



When you use the Microsoft Excel 4.0 SEND.MAIL macro function in a macro sheet in the Microsoft Excel versions listed at the beginning of this article, the macro halts and you receive the following error message:

Macro error at cell:

where the cell reference is the cell containing the SEND.MAIL function.



CAUSE
In Microsoft Excel 4.0, the function works as described in the documentation: that is, =SEND.MAIL? and =SEND.MAIL are equivalent. However, in Microsoft Excel versions 5.0, 7.0, and 97, the functionality for the Visual Basic for Applications version of this command was changed and the Microsoft Excel 4.0 Macro language was changed to accommodate that modification. However, the documentation was not updated to reflect these changes.

The documentation should include the following information:

SEND.MAIL?
No required parameters. Displays a dialog box.

SEND.MAIL
Only required parameter is "recipients." Never displays a dialog box.



RESOLUTION
To resolve this problem, use SEND.MAIL? instead of SEND.MAIL.



MORE INFORMATION
Based on the documentation, the SEND.MAIL function does not require any arguments and should work correctly. In Microsoft Excel 4.0, SEND.MAIL and SEND.MAIL? have the same functionality and neither version requires arguments. In Microsoft Excel Visual Basic for Applications, the equivalent method, SendMail, requires arguments.

Additional query words: XL

Keywords: kbmacro kbprogramming kbprb kbdocerr KB131558

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.