-
I'm trying to build a loop that automatically sets the values of a group of check boxes based on information in an Array. How can i generate the name of the current checkbox name in this loop, it's abit hard to explain but hopefully you can see what i'm trying to do from the code :
GetSites 'Calls a function that gets all the values
For i = 1 To 12
Check&i.Value = Sites(i)
Next i
-
How about using a control array instead, change all checkboxes to have the same name and set their indexes the order you want. Might be not as easy as delete all checkboxes and create one, name it check and copy and paste it 11 times
Code:
For i = 1 To 12
Check(i-1).Value = Sites(i)
Next i