XML and DOMDocument

D

Diamond, Mark

I'm a reasonably experienced programmer, but not with VBA.
I have a copy of a workbook which downloads some information from a website.
In the VBA code, there are references to DOMDocument ... e.g.

Dim oDom as New DOMDocument

However, when I try the same thing myself in a new spreadsheet, I get an
error indicating that DOMDocument is undefined. I presume that the original
spreadsheet automatically loads a library of some sort but I can't find any
other reference to it (a library).

So, the questions, with which I'd very much appreciate some help, are ...

Is there a library being loaded?
What library would it be?
Where should I be looking in the original spreadsheet to find the statements
that cause the loading?
What should I be putting in my own new workbook so that I can use
DOMDocument (and where should it go).


Cheers,

Mark
 
R

Rob

I'm a reasonably experienced programmer, but not with VBA.
I have a copy of a workbook which downloads some information from a website.
In the VBA code, there are references to DOMDocument ... e.g.

Dim oDom as New DOMDocument

However, when I try the same thing myself in a new spreadsheet, I get an
error indicating that DOMDocument is undefined. I presume that the original
spreadsheet automatically loads a library of some sort but I can't find any
other reference to it (a library).

So, the questions, with which I'd very much appreciate some help, are ...

Is there a library being loaded?
What library would it be?
Where should I be looking in the original spreadsheet to find the statements
that cause the loading?
What should I be putting in my own new workbook so that I can use
DOMDocument (and where should it go).

Cheers,

Mark

Hi Mark.

You must set a reference to Microsoft XML, v6.0.

To set references in VBA goto tool, references, and then select the
reference from the available references.

-Rob
 
D

Diamond, Mark

Many thanks, Rob. I've checked the original worksheet VBA and it does,
indeed, have the appropriate reference ... and mine, of course, did not.

Thanks again.

Mark
 
S

Shasur

Hi Mark

Your old Excel Workbook should contain reference to Microsoft XML, V6.0
(Vn.n) library. This is missing in your current one

You can check the old one from your VBA editor (Tools --> References --> ).
You will find the List of references included enabled in the checkbox.

You will also get the associated DLL for each one of them in the display
below (msxml6.xml, for example)

Cheers
Shasur
 

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