Just name them the same and they will be a collection. Then you access them using their index. Having 4 boxes they will be indexed 0-3. Like txtPlants(1) for the second one.
( It looks best in the code if you define global constants naming them:
cTrees = 0
cFlowers = 1 etc.
Then reference them like this: txtPlants(cTrees)
)
They will share the same code with the index passed into the sub if you have some code on Click for example.
By doing this you can loop through them like:
for i = 0 to 4
' your code here using this kind of reference: txtPlants(i)
next i
|