mdlunloadform.bas
来自「旅行社管理信息系统主要实现旅游路线、景点、交通工具等的查询、修改和删除功能」· BAS 代码 · 共 34 行
BAS
34 行
Attribute VB_Name = "mdlUnloadForm"
Option Explicit
Public Sub sfFormsUnload() '(ByRef frm As Variant)
'---------------------------------------------------
'Purpose: unloads all forms other than one
'Inputs: Form to leave loaded,typically the main form
'Passed: None
'Returns: safe Error Message
'Outputs: All other forms are affected
'Notes : Used in the main form unload to
' ensure all other forms are unloaded
'Usage: call sfFormsUnload
'-----------------------------------------------------
Dim Frm As Form
On Error GoTo Errtrap
' 在窗体集合中循环
' 从内存中卸载所有的窗体
For Each Frm In Forms
' If Not Frm Is frmApiCopy Then
Frm.Hide ' 隐藏窗体
Unload Frm ' 卸载窗体
Set Frm = Nothing ' 从内存中删除窗体
' End If
Next
Exit Sub
Errtrap:
On Error GoTo 0
MsgBox Err.Description, vbExclamation
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?