I have some VBA code which takes information from checkboxes on a form. There are 10 check boxes and basicaly i want to go through a series of if statements where:
if chkBox1 = True
array(0) = "AA"
if chkBox2 = True
array(1) = "BB"
...etc
But obviously this would only work if all check boxes were selected, how would i go about adding to the end of array no matter how many values are already stored in it?
I was thinking something like
counter = 0
if chkBox1 = True
array(counter) = "AA"
counter = counter + 1
else
'do nothing
if chkBox2 = True
array(counter) = "BB"
counter = counter +1
else
'do nothing
But was just wondering if there was any kind of add to end of array function I could call?
Also, is it possible to return the length of an array? i.e how many values are stored in it?
Thanks in advance
Bookmarks