Re: Determine which button was clicked on a sheet



Hi XP,

Just to add, having assigned this macro to each button of interest, clicking
the button will return a message comprising the button's name.


---
Regards,
Norman



"Norman Jones" <normanjones@xxxxxxxxxxxxxxxxxxx> wrote in message
news:uSays%23AMHHA.1280@xxxxxxxxxxxxxxxxxxxxxxx
Hi XP,

Try something like:

'=============>>
Public Sub Tester()
MsgBox Application.Caller
End Sub
'<<=============



---
Regards,
Norman



"XP" <XP@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:CAEB7DC0-998C-4836-B659-5E0750EBE30C@xxxxxxxxxxxxxxxx
I have several regular buttons (i.e. not an activeX button) control on a
sheet. All of these buttons run the same user form, but I want the
results
placed into separate cells depending upon which button was clicked to
load
the form.

Using VBA, can someone please post example code that determines which
button
was clicked on the sheet, using the button's caption as the defining
variable?

Thanks in advance.




.