Dim ctrl As Control
'loop through all form controls
For Each ctrl In Me.Controls
'if control is a Text Box
If TypeOf ctrl Is TextBox Then
'set enabled to false
ctrl.Enabled = False
End If
Next ctrl
There are two ways to write error-free programs; only the third one works.
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.