Designer Property
Applies To
VBComponent object.
Description
Returns the object that enables you to access the design characteristics of a component.
Remarks
If the object has an open designer, the Designer property returns the open designer; otherwise a new designer is created. The designer is a characteristic of certain VBComponent objects. For example, when you create certain types of VBComponent object, a designer is created along with the object. A component can have only one designer, and it's always the same designer. The Designer property enables you to access a component-specific object. In some cases, such as in standard modules and class modules, a designer isn't created because that type of VBComponent object doesn't support a designer.
The Designer property returns Nothing if the VBComponent object doesn't have a designer.
See Also
DesignerWindow property, HasOpenDesigner property.
Example
The following example uses the Designer and Count properties to return the number of controls on a form. Note that the window containing the form must be selected. The Designer object is the form itself.
Debug.Print Application.VBE.SelectVBComponent.Designer.Controls.Count