That code could work in VB6.

Here, though, all elements must have a different name/id, and so you cannot have any control array in your html pages. What are you trying to accomplish that requires a control array?