Visual Basic Extensibility Reference
See Also Example Applies To
- ContainedVBControls collection: Adds a new VBControl object to the ContainedVBControls collection.
- VBControls collection: Adds a new VBControl object to the VBControls collection.
- VBProjects collection: adds a new, empty project to the set of projects in the VBProjects collection.
object.Add (progid As String, [relativevbcontrol As VBControl] [before As Boolean]) As VBControl
object.Add (projecttype As vbext_ProjectType, [exclusive As Boolean]) As VBProject
The Add method syntax has these parts:
|object||An object expression that evaluates to an object in the Applies To list.|
|progid||Required. A string expression specifying the ProgID of the component to be added.|
|relativevbcontrol||Optional. An existing VBControl object specifying the point where the new component is to be inserted.|
|before||Optional. Default = False. A Boolean expression specifying whether the new VBControl is to be placed before or after the relativevbcontrol.|
|projecttype||Required. A VBProject object specifying the type of the new project. For a list of kinds of projects, see the Kind property.|
|exclusive||Optional. Default = False. A Boolean expression specifying whether a new project is added to an existing set of projects, or added as the only project.|
If the exclusive parameter is specified as True, then the existing group project is closed and the new project becomes the only project in the collection.