open acad drawings within excel VBA
I would like to know how to open an autocad drawing within excel VBA.
I wrote the following code but it gives me a run-time error '419'
ActiveX component can't create object
Code:
Dim AcadApp as Acadapplication
Dim MyDwg as AcadDocument
Dim DWG as string ' file path
Set AcadApp = GetObject(, "AutoCAD.Application")
Set MyDwg = AcadApp.Documents.Open(DWG)
reply feel free to contact me if more info required..
thank you very much
gary lee
email: spedia3214@yahoo.com