XL5: Macro Fails If Optional Argument Uses Integer Data TypeLast reviewed: September 2, 1997Article ID: Q112321 |
The information in this article applies to:
SYMPTOMOn page 128 in some versions of the "Visual Basic User's Guide," the example that illustrates the REVERSE() function, contains the following line of code:
Function Reverse (S As String, Optional ByVal n As Integer)This code is incorrect. The optional argument "Optional ByVal n As Integer" is incorrect because, as is stated in the paragraphs immediately preceding the function code, all optional arguments must be of the Variant data type.
WORKAROUNDThe correct line of code is the following:
Function Reverse (S As String, Optional ByVal n As Variant) STATUSThis problem has been corrected in versions of the "User's Guide" dated later than January 1994.
|
Additional query words: 5.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |