Hi,
Below is the array using so that I can disable 5 checkbox have in worksheet.
It does not take value from the array assigned when it comes to steps on FOR....Next
e.g. ar_cbox(i) shows 1 instead of the value cbox_dept1
[red]The below code is to deactivate every checkbox and another FOR next to assign null value.
Both doesn't work ? Any advise/suggestion? [/red]
Below is the array using so that I can disable 5 checkbox have in worksheet.
It does not take value from the array assigned when it comes to steps on FOR....Next
e.g. ar_cbox(i) shows 1 instead of the value cbox_dept1
[red]The below code is to deactivate every checkbox and another FOR next to assign null value.
Both doesn't work ? Any advise/suggestion? [/red]
Code:
Sub DisableCheckBox
Dim ar_cbox(5), ar_string(5) As String
ar_cbox(1) = "cBox_dept1"
ar_cbox(2) = "cBox_dept2"
ar_cbox(3) = "cBox_dept3"
ar_cbox(4) = "cBox_dept4"
ar_cbox(5) = "cBox_dept5"
ar_string(1) = "user1"
ar_string(2) = "user2"
ar_string(3) = "user3"
ar_string(4) = "user4"
ar_string(5) = "user5"
For i = 1 To 5 Step 1
Worksheets("Sheet1").ar_cbox(i).Value = False
Next i
i = 1
For i = 1 To 5 Step 1
ar_string(i).value = ""
Next i
End sub