Hello All,
I am trying to get the position of a certain button on my excel sheet here is the code im using:
Dim r As Range
Set r = ActiveSheet.Buttons(Application.Caller).TopLeftCell
MsgBox r.Row 'row number for the button
MsgBox r.Value 'its value
It keep telling me "unable to get button property of the worksheet class" and highlights the "Set r" line.
What am i doing wrong?
Thanks.
I am trying to get the position of a certain button on my excel sheet here is the code im using:
Dim r As Range
Set r = ActiveSheet.Buttons(Application.Caller).TopLeftCell
MsgBox r.Row 'row number for the button
MsgBox r.Value 'its value
It keep telling me "unable to get button property of the worksheet class" and highlights the "Set r" line.
What am i doing wrong?
Thanks.