XML parser loading into multiple XML maps with VBA

Goldmaverick

New Member
Joined
Apr 24, 2014
Messages
2
I built an xml parser with excel.
I wrote some vba (with help from this forum) to open a dialogue box to import my xml file. (code below)
Currently it loads into a single xml map (Base_CRD_Map), but I want it to load into 6 xml maps all within one workbook and I'd like to know how to write a code to load into multiple xml maps.

Here is my code: (this code opens a dialogue box, from which I can select the xml file to import, it then imports it into the map schema 'Base_CRD_Map')
-------------------------------------------------------------------------------------
Sub ImportFullXML()
fileToOpen = Application _
.GetOpenFilename("XML Files (*.xml), *.xml")
If fileToOpen = False Then
MsgBox ("Cannot Open file - Exiting Macro")
Exit Sub
End If




ActiveWorkbook.XmlMaps("Base_CRD_Map").Import URL:=fileToOpen
End Sub
-------------------------------------------------------------------------------------

I'm having issues with designating additional maps for it to load into, for instance: 'base_crd_map1' 'base_crd_map2', etc.

Thank you.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top