Run-time error '-2147221231 (80040111)': Automation error ClassFactory cannot supply requested class 
Author Message
 Run-time error '-2147221231 (80040111)': Automation error ClassFactory cannot supply requested class

I'm getting this error trying to set up a msxml 4.0 DOM document.  I'm
trying this with new code and with old code that used to run
perfectly.  The new code is the simplest in a one button form with the
button named 'cmdLoad'  Here's the code:

Private Sub cmdLoad_Click()
    Dim doc As New MSXML2.DOMDocument
    Set doc = CreateObject("MSXML2.DOMDocument")
End Sub

The error occurs when the Set line is executed.

I've uninstalled and reinstalled msxml 4.0, I've double and triple
checked that the project has msxml 4.0 chosen as a reference.  Nothing
seems to work.  I'm at my wit's end.  I've looked in this newsgroup,
but can't find any reference to this exact message.  Any suggestions
would be appreciated.

Thank you,

IDNMember



Wed, 04 Aug 2004 01:55:42 GMT  
 Run-time error '-2147221231 (80040111)': Automation error ClassFactory cannot supply requested class

Quote:
> I'm getting this error trying to set up a msxml 4.0 DOM document.  I'm
> trying this with new code and with old code that used to run
> perfectly.  The new code is the simplest in a one button form with the
> button named 'cmdLoad'  Here's the code:

> Private Sub cmdLoad_Click()
>     Dim doc As New MSXML2.DOMDocument
>     Set doc = CreateObject("MSXML2.DOMDocument")
> End Sub

Why do you first dim it as New (and thereby enabling
auto-instantiation, and then SET it (instantiaing it again)
with CreateObject?

Try:
     Dim doc As MSXML2.DOMDocument
     Set doc = New MSXML2.DOMDocument

dag.

Quote:

> The error occurs when the Set line is executed.

> I've uninstalled and reinstalled msxml 4.0, I've double and triple
> checked that the project has msxml 4.0 chosen as a reference.  Nothing
> seems to work.  I'm at my wit's end.  I've looked in this newsgroup,
> but can't find any reference to this exact message.  Any suggestions
> would be appreciated.

> Thank you,

> IDNMember



Wed, 04 Aug 2004 04:13:29 GMT  
 Run-time error '-2147221231 (80040111)': Automation error ClassFactory cannot supply requested class
Dag,

     Thank you for your reply.  I tried the code you suggested and got
the same error as the one I was getting before.

IDN Member

Quote:



> > I'm getting this error trying to set up a msxml 4.0 DOM document.  I'm
> > trying this with new code and with old code that used to run
> > perfectly.  The new code is the simplest in a one button form with the
> > button named 'cmdLoad'  Here's the code:

> > Private Sub cmdLoad_Click()
> >     Dim doc As New MSXML2.DOMDocument
> >     Set doc = CreateObject("MSXML2.DOMDocument")
> > End Sub

> Why do you first dim it as New (and thereby enabling
> auto-instantiation, and then SET it (instantiaing it again)
> with CreateObject?

> Try:
>      Dim doc As MSXML2.DOMDocument
>      Set doc = New MSXML2.DOMDocument

> dag.

> > The error occurs when the Set line is executed.

> > I've uninstalled and reinstalled msxml 4.0, I've double and triple
> > checked that the project has msxml 4.0 chosen as a reference.  Nothing
> > seems to work.  I'm at my wit's end.  I've looked in this newsgroup,
> > but can't find any reference to this exact message.  Any suggestions
> > would be appreciated.

> > Thank you,

> > IDNMember



Sat, 21 Aug 2004 02:34:48 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Run-time error '-2147417846 (8001010a)': Automation error (error 440)

2. Run-time error '-2147417846 (8001010a)': Automation error (error 440)

3. rvbrewiz - Run-time error '-2147417851 (80010105)': Automation error

4. Run-time error '31037': Error load form file

5. Run-time error '50003' Unexpected Error

6. Run-Time Error '2950' - Reserved Error

7. run-time error '713': Application-defined or object-defined error

8. Run-time error '50003': Unexpected error

9. Run-time error '429': ActiveX component can't create object

10. Run-Time Error '429': ActiveX component can't create object

11. Run time error '429': ActiveX component can't create object

12. Run-time error '429': ActiveX component can't create object

 

 
Powered by phpBB® Forum Software