views:

93

answers:

3

Hello All,

I've multiple form buttons in multiple cells and when clicked any one of them, i've to perform a function. Now i need to know which cell has this clicked button so that i can take next steps.

Thanks in advance

A: 

Form controls aren't linked directly to worksheet cells. They can be 'anchored' to them for size & alignment purposes, but don't as far as I know have any relationship with the cell that would allow you to get a cell reference, assuming one could even be determined without ambiguity.

Each form control can only run one macro though, so surely it is easy to identify that way, no?

Lunatik
A: 

While you're in Design Mode (meaning you can move and resize buttons), you can double click on a button and the VBA editor will open up with a subroutine for the Click event of that button. As mentioned above, they're not linked to the cell you happen to have them over in any way.

Michael