Hello All,

I am pretty new to VBA and am stuck on a problem that might be quite easy for some of you.

I have an Excel worksheet with 100 command buttons (from Forms toolbar), one per cell, as shown below. Associated with each of these buttons are numerical values in the same row of the next colum.

Row # Column A Column B
----- ---------------------------
1 CmdButton1 NumValue1
2 CmdButton2 NumValue2
: : :
100 CmdButton100 NumValue100

Assuming that I name these command buttons at design time, what I would like to do upon detection of a button click (any of the 100 buttons) is to call a function passing as parameters = the row number (associated with the button pressed), the name of the commandbutton pressed, and the corresponding "Numvalue" from that row.

What would be the best way to code something like this? This code would need to work in Excel versions 97 and up.
I know that something like a control array might be needed, but I really have no clue as to how to get started.

I'd really appreciate any help on this.

Thanks!

Manish