i have an array of 101 command buttons called carnivore(0 to 100) and i want them to all execute a piece of code. for example, i want them to all execute this piece of code:

text1.text = carnivorevar(i).attack

i being the index of the button i clicked

is there any simple way to do this, i mean other than pasting the code into each and every command's click event?