Error 429

Discussion in 'AutoCAD' started by coachball8, Apr 6, 2004.

  1. coachball8

    coachball8 Guest

    Firing a macro at open and close of a drawing, on some machines I get an Error code 429. I have a reference to the Microsoft ActiveX 2.7 object library, and the msado15.dll is present on all machines. Trying to setup a begin_close event.
    On some machines, I recieve the error "Could not create the ActiveX object(or something to that effect), while others work fine. The code reads as follows:

    Public WithEvents ACADApp As AcadApplication

    Sub Example_AcadApplication_Events()
    Set ACADApp = GetObject(, "AutoCAD.Application")
    End Sub
    Any ideas on why it doesn't work on all machines? Running Acad 2K4, WinXP. TIA
     
    coachball8, Apr 6, 2004
    #1
  2. Assuming you are doing this in vba [because you mention macro], here is how
    you get the running instance:

    Set ACADApp = AcadApplication

    Don't use GetObject unless you are working in full VB. Second and most
    likely problem is the version of ADO. On the ones that error, check the
    installed version - just because they have msado15.dll doesn't mean its
    2.7.
     
    Mike Tuersley, Apr 6, 2004
    #2
  3. coachball8

    coachball8 Guest

    Thanks Mike........but I'm a little confused now. They are all linking to a common database, so shouldn't they all require the same references? I'm a little green in the VBA arena, but learning it. I'll change some of the references and see if it helps, but in the meantime, any further enlightment you can offer is greatly appreciated.
     
    coachball8, Apr 6, 2004
    #3
  4. coachball8

    coachball8 Guest

    Okay Mike. I changed it from getobject to acadapplication and that fixed the problem. I'd still like to know why the other way works on some machines, and on some it doesn't. Thanks again.
     
    coachball8, Apr 6, 2004
    #4
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 (here). After that, you can post your question and our members will help you out.