Connection Property

Returns or sets the ADO Connection object used by the specified object. Read/write for the PivotTable object; read-only for the DataSourceControl and DSCEventInfo objects.

expression.Connection

*expression   * Required. An expression that returns one of the objects in the Applies To list.

Remarks

Use caution when calling methods or setting properties for the Connection object returned by this property. For example, you should not call the Connection object's Close method.

Important   For information about secure data connections, see Making Connections to External Data Sources More Secure.

Applies to | DataSourceControl Object | DSCEventInfo Object | PivotTable Object

See Also | CommandText Property | ConnectionString Property