Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 2.81 KB

definitions-of-property-procedures-for-the-same-property-are-inconsistent.md

File metadata and controls

30 lines (19 loc) · 2.81 KB
title keywords f1_keywords ms.assetid ms.date ms.localizationpriority
Definitions of property procedures for the same property are inconsistent
vblr6.chm1019369
vblr6.chm1019369
0dbd5698-d475-fdc5-ce9a-803835530afa
06/08/2017
medium

Definitions of property procedures for the same property are inconsistent

The parameters for Property Get, Property Let, and Property Set procedures for the sameproperty must match exactly, except that the Property Let has one extra parameter, whose type must match the return type of the corresponding Property Get, and the Property Set has one more parameter than the corresponding Property Get, whose type is either Variant, Object, a class name, or an object library type specified in an object library. This error has the following causes and solutions:

  • The number of parameters for the Property Get procedure isn't one less than the number of parameters for the matching Property Let or Property Set procedure. Add a parameter to Property Let or Property Set or remove a parameter from Property Get, as appropriate.

  • The parameter types of Property Get must exactly match the corresponding parameters of Property Let or Property Set, except for the extra Property Set parameter. Modify the parameter declarations in the corresponding procedure definitions so they are appropriately matched.

  • The parameter type of the extra parameter of the Property Let must match the return type of the corresponding Property Get procedure. Modify either the extra parameter declaration in the Property Let or the return type of the corresponding Property Get so they are appropriately matched.

  • The parameter type of the extra parameter of the Property Set can differ from the return type of the corresponding Property Get, but it must be either a Variant, Object, class name, or a valid object library type.

    Make sure the extra parameter of the Property Set procedure is either a Variant, Object, class name, or object library type.

  • You defined a Property procedure with an Optional or a ParamArray parameter. ParamArray and Optional parameters aren't permitted in Property procedures. Redefine the procedures without using thesekeywords.

For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).

[!includeSupport and feedback]