A property or method call cannot include a reference to a private object, either as an argument or as a return value

Among the possible causes of this error are:

  • A client invoked a property or method of an out-of-process component and attempted to pass a reference to a private object as one of the arguments.

  • An out-of-process component invoked a call-back method on its client and attempted to pass a reference to a private object.

  • An out-of-process component attempted to pass a reference to a private object as an argument of an event it was raising.

  • A client attempted to assign a private object reference to a ByRef argument of an event it was handling.

To correct this error

  • Remove the reference.

See Also

Reference

Private (Visual Basic)