Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Easy question, hopefully?

Status
Not open for further replies.

osx99

Technical User
Apr 9, 2003
250
GB
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?

thanx
osx
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top