The information in this article applies to:
SYMPTOMS
Setting the default value of an Optional String argument to vbNullString
causes the following error when the project is compiled with Binary
Compatibility:
RESOLUTION
Use quotation marks instead of vbNullString. For example:
You may also see the error:
This occurs when you attempt to set the default value of a Variant optional argument to Null. Avoid using any of the null-related constants (vbNull, vbNullString, etc.) when providing a default value for an optional argument. STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been fixed in Visual Basic 6.0. MORE INFORMATION
A project containing the specification of this default value returns an
error stating that the method for which the argument is defined is not
Binary Compatible. This problem is specific to the use of vbNullString. It
does not affect default values for Optional arguments in general.
Steps to Reproduce Behavior
Additional query words: kbVBp500BUG kbVBp600fix kbAutomation kbVBp kbdsd KBCOMPILER kbDSupport
Keywords : kbGrpVB |
Last Reviewed: January 5, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |