replace option value toggle button

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.
 
A

Allen Browne

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top