Finding Row or Button Name
"Norman Jones" wrote in message
...
Hi Bruno,
Re-reading your question, try:
'============
Sub Tester3()
Dim Rng As Range
Dim WB As Workbook
Dim SH As Worksheet
Dim btn As Button
Const sStr As String = "Button 12" '<<==== CHANGE
Dim StrAddress As String
Set WB = ActiveWorkbook '<<======= CHANGE
For Each SH In WB.Worksheets
On Error Resume Next
Set btn = SH.Buttons(sStr)
On Error GoTo 0
If Not btn Is Nothing Then
StrAddress = _
btn.TopLeftCell.Address(external:=True)
Exit For
End If
Next SH
If Not btn Is Nothing Then MsgBox StrAddress
End Sub
'<<============
---
Regards,
Norman
Ok, very useful Norman.
Then again:
How to find the macro a button is assigned to?
Ciao
Bruno
|