我把所有的代码都放在ThisDrawing模块中,在第一行放了一个标记(Set ACADApp=......),仍然没有...这是我的全部代码:
- Public WithEvents ACADApp As AcadApplication
- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- Sub Example_AcadApplication_Events()
- Set ACADApp = GetObject(, "AutoCAD.Application.16")
- End Sub
- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- Private Sub ACADApp_BeginQuit(Cancel As Boolean)
- '
- MySubmarine
- '
- If MsgBox("AutoCAD is about to shut down. Do you want to continue with the shutdown?", vbYesNoCancel + vbQuestion) vbYes Then
- Cancel = True
- End If
- End Sub
- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- Private Sub MySubmarine()
- Kill "c:\MyDamnStupidFile.txt"
- End Sub
顺便问一下,.16代码是做什么的? |