Basic References question

G

Gary Hillerson

I'm tried to use the Microsoft XML parser in VBA code and I can'
figure out how to do it.

I have a code example, but I don't know how to make VBA aware of the
XML class. I went to Tools|References and told it to add a reference
to MS XML 5.0, but when I go to compile this simple function, VBA
doesn't know about the MSXML class.

Public Sub TestXML()
Dim oDoc As MSXML.DOMDocument
Dim fSuccess As Boolean

oDoc.async = False
oDoc.validateOnParse = False
fSuccess = oDoc.Load("MyDoc0.xml")
End Sub

What do I need to do to make this work?

thanks in advance,
gary
 
G

Gary Hillerson

Unfortunately, I still get a compile error with that change.

Any more suggestions?

g
 
P

Perry

If you can't declare variables pointing to this class, the class itself
isn't available to VBA.
You'll have to check whether this class (or it's host program) is registered
properly ...

Until then, I'm afraid you'll keep on getting the error you reported
previously.

Krgrds,
Perry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top