L
Lin
Hi
I have a set of checkboxes in worksheet. I am using the following code to
get the value of the checkbox if it's checked. But Some how it is not working
at all. I am not getting error either.
Dim k As Integer
Dim CH(1 To 5) As Object
Set CH(1) = CH1
Set CH(2) = CH2
Set CH(3) = CH3
Set CH(4) = CH4
Set CH(5) = CH5
For k = 1 To 5
With Worksheets("Sheet1")
If CH(k).Value = True Then
Worksheets("Sheet2").[A2] = CH(k).Caption
Else
Worksheets("Sheet2").[A2] = " "
End If
End With
Next k
Any help really appreciate
Thanks
I have a set of checkboxes in worksheet. I am using the following code to
get the value of the checkbox if it's checked. But Some how it is not working
at all. I am not getting error either.
Dim k As Integer
Dim CH(1 To 5) As Object
Set CH(1) = CH1
Set CH(2) = CH2
Set CH(3) = CH3
Set CH(4) = CH4
Set CH(5) = CH5
For k = 1 To 5
With Worksheets("Sheet1")
If CH(k).Value = True Then
Worksheets("Sheet2").[A2] = CH(k).Caption
Else
Worksheets("Sheet2").[A2] = " "
End If
End With
Next k
Any help really appreciate
Thanks