README.md

December 4, 2022 ยท View on GitHub

Close all forms within a project.

Description

Add this code to a module and simply use CloseAll to unload all forms in your project.

More Info

None that I know off, I haven't had any problems yet... a decrease in use of Unload and End?

Submitted On
ByMike
LevelBeginner
User Rating4.3 (13 globes from 3 users)
CompatibilityVB 6.0
CategoryVB function enhancement
WorldVisual Basic
Archive File

Source Code

Sub CloseAll()
On Error Resume Next
Dim intFrmNum As Integer
 intFrmNum = Forms.Count
Do Until intFrmNum = 0
 Unload Forms(intFrmNum - 1)
 intFrmNum = intFrmNum - 1
Loop
End Sub