Hi everyone, I have a picturebox (called GridFrame) which can have any amount of checkboxes in it. During a Sub I am wanting to check each checkbox in Gridframe and see if they are check, and if so, add text to a cell.
Here is what I want to do:
Of course this doesnt work and I get a Variable not defined error which points to CheckBox. So, if you can understand what I am trying to do, then what suggestions might anyone have on what I should do or a correct way of how I should do it using the For Each Statement. Thanx everyone for the help! =)VB Code:
For Each CheckBox In GridFrame If CheckBox.Value = True Then CellText = DetailsGrid.CellText((lRow - 2), 5) If CellText = "" Then CellText = CheckBox.Caption Else CellText = CellText & "; " & CheckBox.Caption End If End If Next CheckBox![]()




Reply With Quote