Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

The Instancing Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

You might notice that a class module has an additional property in the Properties window, the Instancing property. This property specifies whether the class module should be visible from another project when you have set a reference to the project that contains the class module. The property has two settings, Private, which is the default setting, and PublicNonCreatable. If you set the Instancing property to Private, a project that sets a reference to your project will not be able to view that class module in the Object Browser, nor will it be able to work with an instance of the class. If you set it to PublicNonCreatable, a project that sets a reference to your project can see the class module in the Object Browser. The referencing project can work with an instance of the class, but only if the referenced project has first created that instance. The referencing project cannot actually create the instance itself.

For more information about the Instancing property, search the Visual Basic Reference Help index for "Instancing property."

See Also

Why Build Your Own Objects? | Basic Class Concepts | Creating Property Procedures | Creating Events and Event Procedures | Extending Objects Through Interfaces | Designing Object Models | Creating Custom Objects for Web Pages

Show:
© 2015 Microsoft