OLEDBConnection.SourceDataFile (Excel)

Returns or sets a String indicating the source data file for an OLE DB connection.

For file-based data sources (for example, Access) the SourceDataFile property contains a fully qualified path to the source data file. It is null for server-based data sources (for example, SQL Server). The SourceDataFile property is set to null if the Connection property is changed programmatically.


ActiveWorkbook.Connections(1).OLEDBConnection.SourceDataFile =