Abilita o disabilita tutti i controlli form




'In your visual basic project, insert the following code

'into a module:

Sub EnableAll(Enabled As Boolean, ParamArray objs() _
As Variant)
Dim obj As Variant
For Each obj In objs
obj.Enabled = Enabled
Next obj
End Sub

Now for example, to enable the Text1, Text2,
Command1, and Command2 controls all simultaneously,
just use the following code:
EnableAll True, Text1, Text2, Command1, Command2
To disable all of the controls,
simply change the True to a False.










( abilitaodisabilitatuttiicontrolliform.html )- by Paolo Puglisi - Modifica del 17/12/2023