PDA

View Full Version : XML Map Export and Save



Gabster
08-17-2020, 10:47 AM
I was wondering if I could get some help with this. I have a worksheet that has about 15 xml mapped rows to different maps. I would like to loop through all of them that contain data and export them out and saving them with the cell value in one of the rows. So far I have this, which works but I would need to do 15 macros for all of them to export and save. I am also no VBA expert.

Here is the code I have.

Sub ExportAndSave()
'
'
'
'
Dim objMapToExport As XmlMap

Set objMapToExport = ActiveWorkbook.XmlMaps("Map_Row1")
ActiveWorkbook.SaveAsXMLData [C2] & ".xml", objMapToExport

End Sub

Any help is appreciated. TIA