When I use the this code in an Excel VBA macro:
Dim xmlKnoten As New IXMLDOMNode
I always get an error. How do I initiate it right?
The initiation of an DOMDocument
works:
Dim xmlDoc As Object
Set xmlDoc = CreateObject("Msxml2.DOMDocument")
Thanks for helping.
First, ensure you have the Microsoft XML reference enabled (my version is v3.0). Once you have that enabled, your code should work, but if it doesn't you can write it like this:
Dim xmlKnoten As New MSXML2.IXMLDOMNode
Hope that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With