problem finding which cell a button was pressed from

  • Thread starter Thread starter ABC
  • Start date Start date
A

ABC

I want to execute some code when a button is pushed (Form button or
Command Button) but I need to know from what cell the button was
pushed. When I try the following

Set location = ActiveSheet.Buttons(Application.Caller).TopLeftCell
MsgBox (location)

I get the error "unable to get the Buttons property of the Worksheet
class".

Does anyone have any ideas on how to fix this?

tks

ABC
 
Back
Top