Message 1 of 23
Failure of VBA to connect to autocad (excel)

Not applicable
04-22-2021
06:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Have an application that worked for years, not no longer connects to autocad. Using 2019 Electrical, with Excel 2016.
This is a section of the code that fails consistently with fault 429 - ActiveX component cant create object.
Any pointers would be greatly appreciated
Sub ConnectToAcad()
Dim AcadApp As AcadApplication
Set AcadApp = CreateObject("AutoCAD.Application")
' have tried - Set AcadApp = GetObject(,"AutoCAD.Application") ----- with same results
' have tried - Set AcadApp = New AcadApplication ----- with same results
AcadApp.Visible = True
AcadApp.ActiveDocument.Utility.Prompt "Excel Connected"
End Sub