Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > Pro Visual Basic 2005
|
Pro Visual Basic 2005 For advanced Visual Basic coders working in version 2005. Beginning-level questions will be redirected to other forums, including Beginning VB 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro Visual Basic 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 6th, 2006, 01:21 PM
Authorized User
 
Join Date: Aug 2006
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default Run time error 429 - ActiveX component can't creat

I keep getting this error "Run time error 429 - ActiveX component can't create" on my program when i try to run it. Right at this line of code:
Set objApp = GetObject(, "Word.Application")

It ran just the other day perfect, now I cannot get past this "Run time error 429 - ActiveX component can't create"
help please. here is a few lines of the code.

Private Sub cmdOpenDocument_Click()

    Set objApp = GetObject(, "Word.Application")

    'OPEN PROCEDURE AND SET DOCUMENT OBJECT
    Documents.Open (Me.txtPath)
    Set objDoc = objApp.ActiveDocument

    'SET PARAGRAPHS COLLECTION OBJECT
    Set objPars = objDoc.Paragraphs

    intLineNum = 1
    intLev01 = 0
    intLev02 = 0
    intLev03 = 0
    intLev04 = 0

    'ENABLE CLOSE DOCUMENT BUTTON
    Me.cmdGetNextLine.Enabled = True
    Me.cmdGetHeader.Enabled = True
    Me.cmdCloseDocument.Enabled = True
    Me.cmdGetNextLine.SetFocus
    Me.cmdOpenDocument.Enabled = False
    Me.cmdSaveDocData.Enabled = True

    'INITIALIZE THE RANK COUNTERS
    Me.txtChRank = 1
    Me.txtSigRank = 1

End Sub

 
Old September 7th, 2006, 12:41 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Ankur_Verma Send a message via MSN to Ankur_Verma
Default

Looks like VBA code to me.

Take a look at this to have an
idea of how its done in VB2005.
http://p2p.wrox.com/topic.asp?TOPIC_ID=33429

Regards
Ankur
 
Old September 8th, 2006, 11:32 AM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

You know Set objApp = GetObject(, "Word.Application") doesn't create an instance of Word, it only retrieves a reference to an already-running instance of it. If Word isn’t running, this will fail. You should include a fall-back course of action when GetObject() fails of running CreateObject().

Also, are you sure that the class name is correct (sometimes these strings change from version to version of the application you’re after)? (And also: Does this code run successfully in VB 6 on the same machine it fails on with .NET?)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Run time error 429- ActiveX component can't create carswelljr VB How-To 2 September 8th, 2006 12:22 PM
Run-Time Error 429 SerranoG Access VBA 2 December 20th, 2004 07:28 PM
Run Time Error 429 wwwdirzala Pro VB Databases 1 July 18th, 2004 11:58 PM
Run-time error '429' Dmitriy Pro VB 6 1 August 27th, 2003 01:46 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.