与版本无关。 给段程序理解一下。 On Error Resume Next Set obj_Acad = GetObject(, "autocad.application") If Err Then Err.Clear On Error Resume Next Set obj_Acad = CreateObject("autocad.application") If Err Then Err.Clear MsgBox "不能运行AutoCAD,请检查是否安装!", vbOKCancel, "警告!" Exit Function End If End If obj_Acad.Visible = True Set obj_Doc = obj_Acad.ActiveDocument Set obj_ModelSpace = obj_Doc.ModelSpace 'MsgBox "运行结束!", vbOKOnly, "工程1!" boo = True |