Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Bruno,
Ok, very useful Norman. Then again: How to find the macro a button is assigned to? Try '============ Sub Tester3A() 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 Dim StrMacro 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) StrMacro = BTN.OnAction Exit For End If Next SH If Not BTN Is Nothing Then MsgBox StrAddress _ & vbNewLine & StrMacro End Sub '<<============ --- Regards, Norman |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Create floating button based on button click in menu | Excel Programming | |||
Adding .xla button for Toggle Calculation Button | Excel Programming | |||
How do I lock a radio button group if a N/A button is selected | Excel Discussion (Misc queries) | |||
Finding a button | Excel Programming | |||
Delete a custom button by holding down the ALT key and dragging the button off the toolbar | Excel Programming |