This code placed in the On Click event of a Button will enable/disable text and list boxes:
On Error Resume Next
Dim ctl As Control
For Each ctl In Me.Controls
With ctl
Select Case .ControlType
Case acTextBox, acListBox
If .Enabled = True Then
.Enabled = False
Else
.Enabled = True
End If
End Select
End With
Next ctl
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.