- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all of you,
after upgrading the newest autocad2022 my excel program can not connect to autocad. Excel program was done in 2010 via visual basic. I use it to read objects from autocad and create list in excel sheet. It stops at stage launching autocad with error message Run-time error '-2147221164 (80040154)' class not registered.
Ive tried repair and reinstal office from 64bit to 32bit. However without succes. It always stucks after clicking debug
at launch autocad. It highlights in yellow(Set AcadApp = New AcadApplication) please see part of scrip below
' launch AutoCAD
Set AcadApp = New AcadApplication
' open the AutoCAD drawing
AcadApp.Documents.Open file_path
errors:
Dim FilterType(0) As Integer
Dim FilterData(0) As Variant
AcadApp.Application.Visible = True
Set ssAperture = AcadApp.ActiveDocument.SelectionSets.Add("SS1")
FilterType(0) = 8
FilterData(0) = "TF EXT APERTURE"
ssAperture.SelectOnScreen FilterType, FilterData
On Error GoTo End10
If ssAperture.Count = 0 Then
AcadApp.ActiveDocument.SelectionSets.Item("SS1").Delete
GoTo errors
Else
End If
Solved! Go to Solution.