Hi All,
I’ve been struggling with how to return the name of checkboxes using a For Next statement so I can push data to cells if the box is checked. There are 20 buttons on the form.
First I tried
Dim DBoard As Worksheet
Set DBoard = ThisWorkbook.Sheets("Woodside Dashboard")
' Planning Area Checkboxes
For i = 4 To 22
If Me.("CBoxRow" & i).Value = True Then DBoard.Cells(i, 4) = "Yes" Else DBoard.Cells(i, 4) = "No"
Next i
Then I tried a variation trying to use the Set command
Set ctl = Me.("CBoxRow" & i).Value
These give me a “Expected: identifier or bracketed expression ERROR) at the “(“ after the “Me.” Above.
How can I write a line of code that will allow me to concatenate the Checkbox name so I can run the If Then Loop?
Thanks in advance for any help - Cheers
I’ve been struggling with how to return the name of checkboxes using a For Next statement so I can push data to cells if the box is checked. There are 20 buttons on the form.
First I tried
Dim DBoard As Worksheet
Set DBoard = ThisWorkbook.Sheets("Woodside Dashboard")
' Planning Area Checkboxes
For i = 4 To 22
If Me.("CBoxRow" & i).Value = True Then DBoard.Cells(i, 4) = "Yes" Else DBoard.Cells(i, 4) = "No"
Next i
Then I tried a variation trying to use the Set command
Set ctl = Me.("CBoxRow" & i).Value
These give me a “Expected: identifier or bracketed expression ERROR) at the “(“ after the “Me.” Above.
How can I write a line of code that will allow me to concatenate the Checkbox name so I can run the If Then Loop?
Thanks in advance for any help - Cheers