Error 429

Error 429

Anonymous
Not applicable
363 Views
3 Replies
Message 1 of 4

Error 429

Anonymous
Not applicable
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
0 Likes
364 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
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.
0 Likes
Message 3 of 4

Anonymous
Not applicable
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.
0 Likes
Message 4 of 4

Anonymous
Not applicable
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.
0 Likes