Addictions
Board Regular
- Joined
- May 27, 2018
- Messages
- 60
- Office Version
- 365
Hello,
I am trying to figure out how to export XmlMap with a prompt to navigate where to save as.
Currently I have a code which exports XmlMap but to the file path and I would like to navigate where to save it as.
Can you help please?.
I am trying to figure out how to export XmlMap with a prompt to navigate where to save as.
Currently I have a code which exports XmlMap but to the file path and I would like to navigate where to save it as.
Can you help please?.
VBA Code:
Sub ExportAsXMLData()
Dim objMapToExport As XmlMap
Set objMapToExport = ActiveWorkbook.XmlMaps("Customer")
If objMapToExport.IsExportable Then
ActiveWorkbook.SaveAsXMLData "Customer Data.xml", objMapToExport
Else
MsgBox "Cannot use " & objMapToExport.Name & _
"to export the contents of the worksheet to XML data."
End If
End Sub