"String" <ke*****@shaw.ca> wrote in message
news:20*********************@news0.telusplanet.net ...
Sorry I guess that was a bit too much to ask. I guess all that is
confusing me is: why do I need cbThis? When I display and use a combobox am I using
cb() or cbThis? Do I set cb(0) = cbThis, cb(1) = cbThis? Am I completely
mixed up? Thanks
Lookup the definition of For...Each, you will find that a for...each loop
iterates through each item in a collection, cbThis is a pointer moving to
each item in the list.
This:
Dim cbThis as ComboBox
For Each cbThis in cb( )
Debug.WriteLine cbThis.Name
Next
Is equivilent to this:
Dim i as Integer
For I = 0 to cbThis.GetUpperBound(0)
Debug.WriteLine cb( i ).Name
Next
I like the prior just because it is more concise (don't need to think about
an indicies, or the bounds of the array). I just don't have time to look
through your code, sorry, but from what I saw, it doesn't seem like you need
an array of combo boxes, just one would do. Are you trying to show a combo
box in the cell of a data grid? What exactly are you trying to accomplish?
Jeremy