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.
Syntax
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:
Part
Description
object
Anobject expression that evaluates to an object in the Applies To list.
progid
Required. Astring 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. ABoolean 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. ABoolean expression specifying whether a new project is added to an existing set of projects, or added as the only project.
Remarks
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.