Version Information
Version Added: Excel

Syntax

expression.MakeConnection

expression A variable that represents an OLEDBConnection object.

Return Value
Nothing

Remarks

The MakeConnection method can be used when a connection drops and the user wants to reestablish the connection.

Various objects and methods might return a run-time error if the connection is dropped. Use of this method assures a connection before executing other objects or methods.

Note
Microsoft Excel might drop a connection temporarily in the course of a session (unknown to the VBA programmer), so this method proves useful.

This method will result in a run-time error if the property of the specified OLE DB connection has been set to False.

See also: