+ Reply to Thread
Results 1 to 16 of 16

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

Hybrid View

  1. #1
    Registered User
    Join Date
    12-27-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    3

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

    Hello Leith Ross,

    I also had the same problem (GetObject) not working. It worked fine on Excel 2003 but when moving to a laptop with Excel 2007 it did not work, however using your empty string suggestion solved the problem. Thanks, Keith.

  2. #2
    Registered User
    Join Date
    12-27-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    3

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

    Hi Again,

    Well, after further testing the solution did not work as I expected, so I summarise as follows:-

    Set XlApp = GetObject(, "Excel.Application")
    works in 2003, i.e. it just fetches the existing running excel object and does not open any new object (exactly the behaviour I was looking for. This however does not work in 2007 version, instead the error code 429 is returned.

    Set XlApp = GetObject("", "Excel.Application")
    as suggested by Leith above solves the Error 429, but the behaviour now is to open a new Excel application. Originally I though this had worked because it returned object, and i saw no new Excel Application running, however this was because it was not visible. I only detected it because the xlApp.Workbooks.Count call was returning 0 open workbooks when clearly there was a workbook open in the visible application.

    Finally however I got it working in 2007, the correct code to use is:
    Set XlApp = GetObject(Class:="Excel.Application")
    with this format, no new object is created, and instead the existing application is returned and the existing workbook is found...

    /k

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1