- 'userform 代码
- Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
- On Error Resume Next
- If CloseMode = vbFormControlMenu Then
- MsgBox "请单击多点击几次窗口""确定""按钮关闭本窗体"
- Cancel = False 'True
- Dim objDoc As AcadDocument, objcad As AcadApplication
- Set objcad = ThisDrawing.Application
- For Each objDoc In objcad.Documents
- objDoc.Close False
- Next
- objcad.Quit
- End If
- End Sub
- ''''''''''''''''''''''''''''''''''''''''''''
- '''''''''''''''''''''''''''''''''''''''''''
- Private Sub CommandButton1_Click()
- On Error Resume Next
- MsgBox ("多点击几次窗口")
-
- End Sub
- 'thisdrawing 代码
- Sub SU()
- Call Us.Show
- End Sub
- Private Sub AcadDocument_EndCommand(ByVal CommandName As String)
- Call SU
- End Sub
|