Name

xmldatabinding.ClearSettings

Synopsis

Removes the data binding for an XML map, disabling the List toolbar’s Refresh XML Data button. Calling the ClearSettings method is equivalent to setting the XmlMap object’s SaveDataSourceDefinition property to False.

The following code imports data into an XML map, then removes the map’s binding to the source file (Numbers.xml):

Set xmap = ThisWorkbook.XmlMaps("Numbers_Map")
fname = ThisWorkbook.path & "\Numbers.xml"
res = xmap.Import(fname, True)
xmap.DataBinding.ClearSettings

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.