Chiude tutti i Form



Public Sub UnloadAllForms(sFormName As String)
Dim Form As Form
For Each Form In Forms
If Form.Name sFormName Then
Unload Form
Set Form = Nothing
End If
Next Form
End Sub

'This is a sub, that you would probably use from the Form_Unload of your

'Main form. So here is the code for that:

Call UnloadAllForms Me.Name
'Also, here is the code if you're calling it from other Subs:

Call UnloadAllForms ""

(chiudetuttiiform.html)- by Paolo Puglisi - Modifica del 25/3/2019