When setting controls visible, enabled, locked etc, is there a way to change these settings for all controls on a form and subforms rather than doing each control individually?
Public Function DisableAllControls(ByRef iForm As Form, Optional ByVal iExcludeControl As String) As Boolean
Dim Ctl As Control
On Error Resume Next
For Each Ctl In iForm.Controls
If Ctl.Name <> iExcludeControl Then
Ctl.Enabled = False
End If
Next 'Ctl
DoEvents
End Function
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.