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.
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.