Developer Tutorial - VBA XML Handling

by vwBFPickford

The buyer of this project required a simple but complete example of handling XML via Excel VBA. Attached is a short AVI demonstrating the simple debugging interface and an extract from one of the BAS modules to show the quality of the code delivered. Code Snippet Attribute VB_Name = "XMLTutorial" Option Explicit &#039; &#039;Requires a reference to MSXML &#039; Public Sub DoIt() Dim xText As String Dim xDoc As MSXML2.DOMDocument50 Dim xNode As MSXML2.IXMLDOMNode &#039;Create some XML, could also be read from a cell&#039;s comment xText = "<root><item/><item><field/><field/></item><item/><item><field/></item></root>" &#039;Create an instance of an XML document Set xDoc = New MSXML2.DOMDocument50 &#039;Load the XML into the XML document Call loadText(xDoc, xText) &

image of username vwBFPickford Flag of United Kingdom Sheffield , United Kingdom

About Me

Many platforms and environments targeted in the production of robust solutions including, though not restricted to; Microsoft Office Automation (Access/Excel/Outlook/Word/Project) Power Bi Reporting & Analytics Windows client desktop application development .Net (C#/VB/ASP), VB6, ASP, BizTalk, Java SE & ME, C/C++ (ANSI/MS Visual/Borland) Microsoft Database Technologies SQL Server 7-2008, Access 97-2007 Embedded Systems Development Arduino/Esp32/STM32

$ 20 USD/hr

NEW FREELANCER!

Tags