createobject(autocad.application.18) gives ActiveX error in VB

createobject(autocad.application.18) gives ActiveX error in VB

Anonymous
Not applicable
1,249 Views
0 Replies
Message 1 of 1

createobject(autocad.application.18) gives ActiveX error in VB

Anonymous
Not applicable
I have a vb application that prints the drawing from everywhere inside our firm and send it to the printer nearest to the person. it is written with visual studio 2005.

Up to Autocad 2010 the following worked fine in Visual studio:
Dim Acad as object
Acad = CreateObject("Autocad.Application")
Acad.Visible = True

but now I get the following error in visual studio: Cannot create ActiveX component.

Even if I use the following text I get this error:
Dim Acad as object
Acad = CreateObject("Autocad.Application.18")
Acad.Visible = True


But if I use on of the following commands in VBA (Doesn't matter which program e.g. word, acad, excel)

Dim Acad as object
set Acad = CreateObject("Autocad.Application")
Acad.Visible = True

or

Dim Acad as object
set Acad = CreateObject("Autocad.Application.18")
Acad.Visible = True

it is working.

could someone please help me?

p.s.

createobject is still working for inventor 2010 and there I use the following
dim invent as object
Invent = CreateObject("Inventor.Application")
Invent.Visible = True

so what goes wrong anybody an idea
0 Likes
1,250 Views
0 Replies
Replies (0)