Private Sub cnt_Set(bo As Boolean)
Dim cnt As Object
On Error Resume Next
For Each cnt In Me.Controls
If Mid(cnt.Name, 1, 5) = "Text_" Then cnt.Locked = IIf(bo, False, True): cnt.BackColor = IIf(bo, &H80000005, &HE0E0E0)
If Mid(cnt.Name, 1, 6) = "Check_" Then cnt.Enabled = IIf(bo, True, False)
Next
End Sub
|