try this:
on error resume next
dim frm as form
for each frm in forms
unload frm
next frm
set frm=nothing
on error resume next
dim frm as form
for each frm in forms
unload frm
next frm
set frm=nothing
解决方案 »
- VB程序设计
- 关于listview多选问题
- 专家有无VBRezQ 的注册版
- 如何删除一个文件
- 请问在VB中Server.Create("ADODB.Steam")中应怎样使用呢
- 如何判断enter键是否按了
- 哪里有好一点的中文朗读控件?凡是回复都给分!
- 项目在Xp正常运行,但到了Win7就出错
- 关于VB插件AddIn开发
- 关于MDI子窗体
- 在使用webbrowser控件时,写入行报Object Variable or With block variable not set, Why? 请教!2000平台,xp平台没有错。
- 在VB6.0中怎样使MSFlexGrid能够读取SQLServr2000中若干张表中的字段信息并打印出来?
Private Sub Mnu_closeall_Click()
'关闭所有MDI子窗体
'Screen.MousePointer = vbHourglass
Do While Not (Me.ActiveForm Is Nothing)
Unload Me.ActiveForm
Loop
'Screen.MousePointer = vbDefault
End Sub
在需要关闭的地方执行它即可实现。