DataFeedConnection.SaveAsODC method (Excel)

Saves the data feed connection as a Microsoft Office Data Connection file.


expression.SaveAsODC (ODCFileName, Description, Keywords)

expression A variable that represents a DataFeedConnection object.


Name Required/Optional Data type Description
ODCFileName Required String Location to save the file.
Description Optional Variant Description that will be saved in the file.
Keywords Optional Variant Space-separated keywords that can be used to search for this file.


The following example saves the connection as an ODC file titled ODCFile. This example assumes data feed connection exists on the active worksheet.

Sub UseSaveAsODC() 
   Application.ActiveWorkbook.Connections("Datafeed1").DataFeedConnection.SaveAsODC ("ODCFile")
End Sub

Return value


Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.