Application.DisplayXMLSourcePane Method (Excel)

Opens the XML Source task pane and displays the XML map specified by the XmlMap argument.

expression .DisplayXMLSourcePane(XmlMap)

expression A variable that represents an Application object.

Parameters

Name

Required/Optional

Data Type

Description

XmlMap

Optional

Variant

The XML map to display in the task pane.

You can use the following code to hide the XML Source task pane.

Application.CommandBars("XML Source").Visible = False

The following example adds an XML map named Customers to the active workbook, and then displays the XML map in the XML Source task pane.

Sub DisplayXMLMap() 
 Dim objCustomer As XmlMap 
 
 Set objCustomer = ActiveWorkbook.XmlMaps.Add( _ 
 "Customers.xsd", "Root") 
 
 objCustomer.Name = "Customers" 
 
 Application.DisplayXMLSourcePane 
 objCustomer 
End Sub
Show:
© 2014 Microsoft