problem finding which cell a button was pressed from

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top