D
Dennis
Does anyone have a code snippet showing how to enumerate the controls in an
Option Group?
Option Group?
Does anyone have a code snippet showing how to enumerate the controls in an
Option Group?
Allen Browne said:This example shows how to enumerate the option buttons in a group, showing
the Name, Option Value, and the Caption of its attached label:
Function EnumOptionGroup(grp As OptionGroup)
Dim ctl As Control
For Each ctl In grp.Controls
If ctl.ControlType = acOptionButton Then
Debug.Print ctl.Name, ctl.OptionValue, ctl.Controls(0).Caption
End If
Next
End Function
Dennis said:Thanks for the examples. One other question. What I'm trying to do is
change the forecolor of the labels. Thanks to your example, I can loop
through the controls and identify which label I want to change. Once I
have
the object name, what syntax allows me to change the forecolor.
thanks
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.