Radoslaw Poprawski
Active Member
- Joined
- Jun 19, 2021
- Messages
- 398
- Office Version
- 365
- Platform
- Windows
so I have a question.
Im trying to cycle thru Option buttons, like in the code below,
However for some reason the counting method does not register the checkboxes.
What im doing wrong?
Im trying to cycle thru Option buttons, like in the code below,
However for some reason the counting method does not register the checkboxes.
What im doing wrong?
VBA Code:
Sub CheckBoxFormat()
Dim CHBX As Shape
Dim ActSht As Worksheet
Dim oOptButton As OptionButton
Dim i As Integer
Dim iButtonCount As Integer
Set ActSht = Sheet2
For iButtonCount = 1 To ActSht.OptionButtons.Count
Set oOptButton = ActSht.OptionButtons(iButtonCount)
Debug.Print oOptButton.Name
Next iButtonCount
End Sub