Dynamically get button caption

Windows 10 Web App

I have buttons that run the same method. I want to know which button was clicked. The method has the following code with Xojo does not like at all:

Dim vButton As String = Me.caption
MsgBox(vButton)

How do I get the button that was clicked?

BTW: I need the caption not the name of the button. The button’s caption(s) dynamically changes.

Maybe you can send the caption as a Method Parameter?

I can. Was holding off on that in case there was a better way.
Thanks

Put your buttons in a control set, so the Action event handler will be common, and you will get the index of the one that was pushed. Program accordingly.

Thanks Michel