I have an HTA that dynamically creates a list of checkboxes depending on what software needs to be installed on a machine.
Everything works fine if there is more than one checkbox to select, but I get the following error message whenever only one checkbox is created:
A Runtime Error has occured.
Do you wish to Debug?
Line: 320
Error: Object doesn't support this propery or method: 'checkNum.lengh'
The checkboxes are created with this layout:
strCount = number created for each checkbox starting at 1
sSplit(0) = name of software split from path to executable
Here is the SUB that is called when you have checked the check box and wish to Install the software:
This code works fine if there are more than one check box created; it only errors out when there is only one check box created.
Can anyone point me in the right direction to correct this problem? Let me know if you need anymore information.
Everything works fine if there is more than one checkbox to select, but I get the following error message whenever only one checkbox is created:
A Runtime Error has occured.
Do you wish to Debug?
Line: 320
Error: Object doesn't support this propery or method: 'checkNum.lengh'
The checkboxes are created with this layout:
Code:
<input type=""checkbox"" id=""" & strCount & """ name=""checkNum"" value=""" & sSplit(0) & """>" & sSplit(0) & "<br>"
strCount = number created for each checkbox starting at 1
sSplit(0) = name of software split from path to executable
Here is the SUB that is called when you have checked the check box and wish to Install the software:
Code:
SUB Install_List(checkNum)
uncheckAll.Disabled = TRUE 'uncheck all button
checkAll.Disabled = TRUE 'check all button
installChecks.Disabled = TRUE 'install button
FOR i = 0 to checkNum.length - 1
IF checkNum(i).checked = TRUE THEN
MSGBOX checkNum(i).Value
END IF
NEXT
END SUB
This code works fine if there are more than one check box created; it only errors out when there is only one check box created.
Can anyone point me in the right direction to correct this problem? Let me know if you need anymore information.