Is there anyway to set up an array or collection of checkboxes?
This is what I have tried so far (all code is indented and my explanation of what my intent is not indented):
Declare an array containing 7 checkboxes
Public ClaimType(6) as CheckBox
I have 7 checkboxes named "ClaimType0" through "ClaimType6". I want to set each item in the checkbox array to the appropriate checkbox.
Set ClaimType(0) = ClaimType0
Set ClaimType(1) = ClaimType1
Set ClaimType(2) = ClaimType2
Set ClaimType(3) = ClaimType3
Set ClaimType(4) = ClaimType4
Set ClaimType(5) = ClaimType5
Set ClaimType(6) = ClaimType6
Now I want to put a check in each checkbox based on whether or not there is a "X" in a cell in a different sheet ("Docket" is the worksheet that contains the cells with the X's, and "Input_Output" is the sheet that contains the checkboxes). IntColumn is the first column that contains the X's.
intColumg = 27
Do While intColumn <= 27
If Docket.Cells(intRow, intColumn).Value = "X" Then
Input_Output.ClaimType(intIndex).Value = 1
Else: intput_outPut.ClaimType(intIndex).Value = 0
End If
intColumn = intColumn + 1
intIndex = intIndex + 1
Loop
Right now I get error window that says:
Compile Error:
Method or data member not found
and it stops at:
Input_Output.ClaimType(intIndex).Value = 1
with .Claimtype highlited
This is what I have tried so far (all code is indented and my explanation of what my intent is not indented):
Declare an array containing 7 checkboxes
Public ClaimType(6) as CheckBox
I have 7 checkboxes named "ClaimType0" through "ClaimType6". I want to set each item in the checkbox array to the appropriate checkbox.
Set ClaimType(0) = ClaimType0
Set ClaimType(1) = ClaimType1
Set ClaimType(2) = ClaimType2
Set ClaimType(3) = ClaimType3
Set ClaimType(4) = ClaimType4
Set ClaimType(5) = ClaimType5
Set ClaimType(6) = ClaimType6
Now I want to put a check in each checkbox based on whether or not there is a "X" in a cell in a different sheet ("Docket" is the worksheet that contains the cells with the X's, and "Input_Output" is the sheet that contains the checkboxes). IntColumn is the first column that contains the X's.
intColumg = 27
Do While intColumn <= 27
If Docket.Cells(intRow, intColumn).Value = "X" Then
Input_Output.ClaimType(intIndex).Value = 1
Else: intput_outPut.ClaimType(intIndex).Value = 0
End If
intColumn = intColumn + 1
intIndex = intIndex + 1
Loop
Right now I get error window that says:
Compile Error:
Method or data member not found
and it stops at:
Input_Output.ClaimType(intIndex).Value = 1
with .Claimtype highlited