replace option value toggle button

  • Thread starter Thread starter Ezekiël
  • Start date Start date
E

Ezekiël

Hello,

Could someone help me with a code to replace the option value of a toggle
button automatically. I have more than 50 toggle buttons and i don't want to
set the value by hand.

I would be very happy if this could work.
 
Dim ctl As Control

For Each ctl in Me.Controls
If ctl.ControlType = acToggleButton Then
If ctl.Parent.Name = "NameOfYourGroupHere" Then
ctl.OptionValue = SomeValueHere
End If
End If
Next
 
Back
Top