Excel VBA: getting row of clicked button
Try this:
Sub Mainscoresheet()
' Mainlineup Macro
Dim b As Object, cs As Integer
Set b = ActiveSheet.Buttons(Application.Caller)
With b.TopLeftCell
cs = .Column
End With
MsgBox "Column Number " & cs
End Sub
Each Shape
has TopLeftCell
property. It contains a cell within which the top left corner of the shape resides.