Add Method (Objects)
The Add method (Objects) adds an object to a collection that contains objects of more than one type.
Syntax
collection .Add(Type)
Applies To
Discussion
Use when a collection contains objects of more than one type, such as in a DataSources collection. The Type parameter specifies a value from the xtrObjectType value list.
A COM exception is thrown in error situations. The message that is passed with the exception varies depending on the error situation.
Parameter |
Description |
---|---|
Type |
Optional for DataSource objects. Note: If the DataSource type is not specified, then the default type is a FlatFileDataSource. Optional for other objects. Specifies a constant of the value list, xtrObjectType. Required when adding DateDimensions and when a type of trDateDimension must be used. Type: Variant |
Return Type
Object
Examples
objDataSource = objModel.DataSources.Add(xtrObjectType.trFlatFileDataSource)