CreateObject returns error 429 and then crashes Word on second call 
Author Message
 CreateObject returns error 429 and then crashes Word on second call

Hi,

The following very simple code works fine when called from a VB
application, but fails when called from Word VBA :

Dim obj As Object
Set obj = CreateObject("hellow.hello")
MsgBox obj.strGetVersion
Set obj = Nothing

The first time the code is executed in VBA, CreateObject returns an
Error 429.
The next time the code is executed, Word crashes (WINWORD caused
failure in module MSVBVM60.DLL).

The HelloW ActiveX DLL is very simple (just strGetVersion function
that returns a String). Only references are:
Visual Basic for Applications (MSVMVB60.DLL)
Visual Basic runtimes and procedures (MSVMVB60.DLL\3)
Visual Basic object and procedures (VB6.OLB)
OLE Automation (stdole2.tlb)

Important information:
The DLL is compiled on NT. It works fine on several Windows 95
machines.
The DLL crashes this way only on 2 Windows 95 workstations.
When compiled on one of these 2 workstations, it works on this
workstation but not on the other one.

What disturbs me is that it works from VB but not from VBA.

Any idea is welcome.

Hugo



Sun, 01 Aug 2004 20:52:33 GMT  
 CreateObject returns error 429 and then crashes Word on second call
Hi Hugo,

First question is of course if you are sure the dll is registered correctly on all the systems?

Hope this helps,
regards,
Astrid

So that all can benefit from the discussion, please post all follow-ups to the newsgroup.
Visit the MVP Word FAQ site at http://www.mvps.org/word/


Quote:
> Hi,

> The following very simple code works fine when called from a VB
> application, but fails when called from Word VBA :

> Dim obj As Object
> Set obj = CreateObject("hellow.hello")
> MsgBox obj.strGetVersion
> Set obj = Nothing

> The first time the code is executed in VBA, CreateObject returns an
> Error 429.
> The next time the code is executed, Word crashes (WINWORD caused
> failure in module MSVBVM60.DLL).

> The HelloW ActiveX DLL is very simple (just strGetVersion function
> that returns a String). Only references are:
> Visual Basic for Applications (MSVMVB60.DLL)
> Visual Basic runtimes and procedures (MSVMVB60.DLL\3)
> Visual Basic object and procedures (VB6.OLB)
> OLE Automation (stdole2.tlb)

> Important information:
> The DLL is compiled on NT. It works fine on several Windows 95
> machines.
> The DLL crashes this way only on 2 Windows 95 workstations.
> When compiled on one of these 2 workstations, it works on this
> workstation but not on the other one.

> What disturbs me is that it works from VB but not from VBA.

> Any idea is welcome.

> Hugo



Tue, 03 Aug 2004 04:54:22 GMT  
 CreateObject returns error 429 and then crashes Word on second call
Hi Astrid,

Yes the DLL are registered (the one I want to use, and the referenced
ones).
The problem is that if I use this DLL from a VB compiled EXE, it works
fine.
But if I try to use it from a VBA macro, I get this error 429 on the
CreateObject call.

Hugo

Quote:

> Hi Hugo,

> First question is of course if you are sure the dll is registered
> correctly on all the systems?

> Hope this helps,
> regards,
> Astrid

> So that all can benefit from the discussion, please post all follow-ups
> to the newsgroup.
> Visit the MVP Word FAQ site at http://www.mvps.org/word/



> > Hi,

> > The following very simple code works fine when called from a VB
> > application, but fails when called from Word VBA :

> > Dim obj As Object
> > Set obj = CreateObject("hellow.hello")
> > MsgBox obj.strGetVersion
> > Set obj = Nothing

> > The first time the code is executed in VBA, CreateObject returns an
> > Error 429.
> > The next time the code is executed, Word crashes (WINWORD caused
> > failure in module MSVBVM60.DLL).

> > The HelloW ActiveX DLL is very simple (just strGetVersion function
> > that returns a String). Only references are:
> > Visual Basic for Applications (MSVMVB60.DLL)
> > Visual Basic runtimes and procedures (MSVMVB60.DLL\3)
> > Visual Basic object and procedures (VB6.OLB)
> > OLE Automation (stdole2.tlb)

> > Important information:
> > The DLL is compiled on NT. It works fine on several Windows 95
> > machines.
> > The DLL crashes this way only on 2 Windows 95 workstations.
> > When compiled on one of these 2 workstations, it works on this
> > workstation but not on the other one.

> > What disturbs me is that it works from VB but not from VBA.

> > Any idea is welcome.

> > Hugo



Tue, 03 Aug 2004 19:59:37 GMT  
 CreateObject returns error 429 and then crashes Word on second call
Hi Hugo,

I have two questions for you:
1.  Have you set a reference to HelloW.dll in your VBA project, and
2.  Is your VBA project compiled?

Thanks,
Marcia

Quote:

> Hi Astrid,

> Yes the DLL are registered (the one I want to use, and the referenced
> ones).
> The problem is that if I use this DLL from a VB compiled EXE, it works
> fine.
> But if I try to use it from a VBA macro, I get this error 429 on the
> CreateObject call.

> Hugo


> > Hi Hugo,

> > First question is of course if you are sure the dll is registered
> > correctly on all the systems?

> > Hope this helps,
> > regards,
> > Astrid

> > So that all can benefit from the discussion, please post all follow-ups
> > to the newsgroup.
> > Visit the MVP Word FAQ site at http://www.mvps.org/word/



> > > Hi,

> > > The following very simple code works fine when called from a VB
> > > application, but fails when called from Word VBA :

> > > Dim obj As Object
> > > Set obj = CreateObject("hellow.hello")
> > > MsgBox obj.strGetVersion
> > > Set obj = Nothing

> > > The first time the code is executed in VBA, CreateObject returns an
> > > Error 429.
> > > The next time the code is executed, Word crashes (WINWORD caused
> > > failure in module MSVBVM60.DLL).

> > > The HelloW ActiveX DLL is very simple (just strGetVersion function
> > > that returns a String). Only references are:
> > > Visual Basic for Applications (MSVMVB60.DLL)
> > > Visual Basic runtimes and procedures (MSVMVB60.DLL\3)
> > > Visual Basic object and procedures (VB6.OLB)
> > > OLE Automation (stdole2.tlb)

> > > Important information:
> > > The DLL is compiled on NT. It works fine on several Windows 95
> > > machines.
> > > The DLL crashes this way only on 2 Windows 95 workstations.
> > > When compiled on one of these 2 workstations, it works on this
> > > workstation but not on the other one.

> > > What disturbs me is that it works from VB but not from VBA.

> > > Any idea is welcome.

> > > Hugo



Sat, 07 Aug 2004 05:36:10 GMT  
 CreateObject returns error 429 and then crashes Word on second call
Do you have Norton Auntie Virus?
If so, disable the NAV Office plug-in, but do NOT disable NAV's AutoProtect.

--
Please post your response to the newsgroup. Do not email me a copy of the
message.

http://www.standards.com/; Programming and support for  Word macros,
including converting from WordBasic to VBA; Technical reviewing; Standards;
Product functional/design/specifications
------------------------------------------------

Quote:
> Hi,

> The following very simple code works fine when called from a VB
> application, but fails when called from Word VBA :

> Dim obj As Object
> Set obj = CreateObject("hellow.hello")
> MsgBox obj.strGetVersion
> Set obj = Nothing

> The first time the code is executed in VBA, CreateObject returns an
> Error 429.
> The next time the code is executed, Word crashes (WINWORD caused
> failure in module MSVBVM60.DLL).

> The HelloW ActiveX DLL is very simple (just strGetVersion function
> that returns a String). Only references are:
> Visual Basic for Applications (MSVMVB60.DLL)
> Visual Basic runtimes and procedures (MSVMVB60.DLL\3)
> Visual Basic object and procedures (VB6.OLB)
> OLE Automation (stdole2.tlb)

> Important information:
> The DLL is compiled on NT. It works fine on several Windows 95
> machines.
> The DLL crashes this way only on 2 Windows 95 workstations.
> When compiled on one of these 2 workstations, it works on this
> workstation but not on the other one.

> What disturbs me is that it works from VB but not from VBA.

> Any idea is welcome.

> Hugo



Sat, 07 Aug 2004 21:17:50 GMT  
 CreateObject returns error 429 and then crashes Word on second call
Hi Marcia,

Here are my two answers for you:
1. No, because I chose to use late binding. But the problem occured
too when referencing the DLL.
2. The VB project was compiled, but I don't think it is the case for
VBA in Word.

I resolved my problem, see the other post in this thread.

Thanks for your help.

Hugo

Quote:

> Hi Hugo,

> I have two questions for you:
> 1.  Have you set a reference to HelloW.dll in your VBA project, and
> 2.  Is your VBA project compiled?

> Thanks,
> Marcia


> > Hi Astrid,

> > Yes the DLL are registered (the one I want to use, and the referenced
> > ones).
> > The problem is that if I use this DLL from a VB compiled EXE, it works
> > fine.
> > But if I try to use it from a VBA macro, I get this error 429 on the
> > CreateObject call.

> > Hugo


> > > Hi Hugo,

> > > First question is of course if you are sure the dll is registered
> > > correctly on all the systems?

> > > Hope this helps,
> > > regards,
> > > Astrid

> > > So that all can benefit from the discussion, please post all follow-ups
> > > to the newsgroup.
> > > Visit the MVP Word FAQ site at http://www.mvps.org/word/



> > > > Hi,

> > > > The following very simple code works fine when called from a VB
> > > > application, but fails when called from Word VBA :

> > > > Dim obj As Object
> > > > Set obj = CreateObject("hellow.hello")
> > > > MsgBox obj.strGetVersion
> > > > Set obj = Nothing

> > > > The first time the code is executed in VBA, CreateObject returns an
> > > > Error 429.
> > > > The next time the code is executed, Word crashes (WINWORD caused
> > > > failure in module MSVBVM60.DLL).

> > > > The HelloW ActiveX DLL is very simple (just strGetVersion function
> > > > that returns a String). Only references are:
> > > > Visual Basic for Applications (MSVMVB60.DLL)
> > > > Visual Basic runtimes and procedures (MSVMVB60.DLL\3)
> > > > Visual Basic object and procedures (VB6.OLB)
> > > > OLE Automation (stdole2.tlb)

> > > > Important information:
> > > > The DLL is compiled on NT. It works fine on several Windows 95
> > > > machines.
> > > > The DLL crashes this way only on 2 Windows 95 workstations.
> > > > When compiled on one of these 2 workstations, it works on this
> > > > workstation but not on the other one.

> > > > What disturbs me is that it works from VB but not from VBA.

> > > > Any idea is welcome.

> > > > Hugo



Wed, 18 Aug 2004 22:56:39 GMT  
 CreateObject returns error 429 and then crashes Word on second call
Hi Howard,

No, we do not use NAV Office plug-in.

I solved my problem, see the other post in this thread.

Thanks for your help.

Hugo

Quote:

> Do you have Norton Auntie Virus?
> If so, disable the NAV Office plug-in, but do NOT disable NAV's AutoProtect.

> --
> Please post your response to the newsgroup. Do not email me a copy of the
> message.

> http://www.standards.com/; Programming and support for  Word macros,
> including converting from WordBasic to VBA; Technical reviewing; Standards;
> Product functional/design/specifications
> ------------------------------------------------


> > Hi,

> > The following very simple code works fine when called from a VB
> > application, but fails when called from Word VBA :

> > Dim obj As Object
> > Set obj = CreateObject("hellow.hello")
> > MsgBox obj.strGetVersion
> > Set obj = Nothing

> > The first time the code is executed in VBA, CreateObject returns an
> > Error 429.
> > The next time the code is executed, Word crashes (WINWORD caused
> > failure in module MSVBVM60.DLL).

> > The HelloW ActiveX DLL is very simple (just strGetVersion function
> > that returns a String). Only references are:
> > Visual Basic for Applications (MSVMVB60.DLL)
> > Visual Basic runtimes and procedures (MSVMVB60.DLL\3)
> > Visual Basic object and procedures (VB6.OLB)
> > OLE Automation (stdole2.tlb)

> > Important information:
> > The DLL is compiled on NT. It works fine on several Windows 95
> > machines.
> > The DLL crashes this way only on 2 Windows 95 workstations.
> > When compiled on one of these 2 workstations, it works on this
> > workstation but not on the other one.

> > What disturbs me is that it works from VB but not from VBA.

> > Any idea is welcome.

> > Hugo



Wed, 18 Aug 2004 22:58:32 GMT  
 CreateObject returns error 429 and then crashes Word on second call
Hi all,

I finally solved this problem yesterday.

When the problem first occured, I upgraded VB 6 to SP5, hoping it
would help.
So the Windows 95 workstation used for compilation had :
MS VC++ 6 (no SP).
MS VB 6 SP5.

Yesterday, I reinstalled MS Visual Studio SP5 (full, not only for VB)
and it solved the problem.

Another Win95 workstation was crashing the same way because I
previously installed other things from the first Win 95 (probably
spreading old DLLs).

My advice is: do not forget to keep consistent versions of SP between
Visual Studio components!

Thanks for your answers,

Hugo

Quote:

> Hi,

> The following very simple code works fine when called from a VB
> application, but fails when called from Word VBA :

> Dim obj As Object
> Set obj = CreateObject("hellow.hello")
> MsgBox obj.strGetVersion
> Set obj = Nothing

> The first time the code is executed in VBA, CreateObject returns an
> Error 429.
> The next time the code is executed, Word crashes (WINWORD caused
> failure in module MSVBVM60.DLL).

> The HelloW ActiveX DLL is very simple (just strGetVersion function
> that returns a String). Only references are:
> Visual Basic for Applications (MSVMVB60.DLL)
> Visual Basic runtimes and procedures (MSVMVB60.DLL\3)
> Visual Basic object and procedures (VB6.OLB)
> OLE Automation (stdole2.tlb)

> Important information:
> The DLL is compiled on NT. It works fine on several Windows 95
> machines.
> The DLL crashes this way only on 2 Windows 95 workstations.
> When compiled on one of these 2 workstations, it works on this
> workstation but not on the other one.

> What disturbs me is that it works from VB but not from VBA.

> Any idea is welcome.

> Hugo



Wed, 18 Aug 2004 23:07:18 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. runtime error 429: createobject???

2. error 429 and CreateObject

3. CDO CreateObject Error 429 - ActiveX component can't create object

4. Error 429 for CreateObject excel.application in ASP, but not VBscript

5. CreateObject - error 429

6. Help VB6 Createobject error 429

7. createobject and error 429

8. ActiveX component can't create object or return reference to this object (Error 429)

9. Error 429 trying to create Word objects - help!

10. problem starting Word - rt error 429

11. Runtime error 429 when creating Word object

12. Intermittent 429 Error with Word OLE Automation

 

 
Powered by phpBB® Forum Software