Ron, Doug,
Thank you very much
Daniel
-----Original Message-----
Hi Daniel
If you use buttons from the Forms Tool bar you can use
Application.Caller
Sub a()
MsgBox ActiveSheet.Shapes
(Application.Caller).BottomRightCell.Address
End Sub
--
Regards Ron de Bruin
http://www.rondebruin.nl
"Daniel Bonallack" wrote in
message ...
I have two command butons on an Excel page, both
assigned
to the same macro. Let's say the function of the macro
is to make the cell to the right of the button blue
shade.
How can I tell which button was pushed?
For example:
Sub WhichButton
Select Case ButtonPushed.Top
Case 100
Range("c10").interior.colorindex = 5
Case <=100
Range("c50").interior.colorindex = 5
End Select
End Sub
Thanks
Daniel
.