Locking all option buttons on a form

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Is there a way to lock all the option buttons on a form
with out typing out them individually?

What about text boxes?

Thanks for your help,

-Chris
 
You can do this with a bit of vba code. AIRCODE follows.

Dim ctlAny as Control

For Each ctlAny in Me.Controls

IF ctlAny.Type = acOptionButton Then
ctlany.locked = true
ctlany.enabled = false
End if

Next CtlAny
 
Back
Top