Application.DisplayXMLSourcePane method (Excel)

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

Syntax

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.

Remarks

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

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

Example

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

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.