Skip to content

Instantly share code, notes, and snippets.

@ucaiado
Last active August 29, 2015 14:09
Show Gist options
  • Save ucaiado/c0180fcb9470f6e32f5a to your computer and use it in GitHub Desktop.
Save ucaiado/c0180fcb9470f6e32f5a to your computer and use it in GitHub Desktop.
VBA: getting the line of clicked button
'source: http://stackoverflow.com/questions/6242605/excel-vba-getting-row-of-clicked-button
Sub test()
MsgBox ("Row of pressed button: " & ActiveSheet.Shapes(Application.Caller).TopLeftCell.Row)
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment