Unable to run macro

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
I'd suggest posting the macro here, with what is / isn't happening in the worksheet, BEFORE anyone opens your file !!
 
Upvote 0
Here is the macro
Sub c()
Dim btn As Button
For Each btn In ActiveSheet.Buttons
Debug.Print "Button " & btn.Name & " with caption " _
& btn.Caption & " Located at " & _
btn.TopLeftCell.Address
Next


End Sub
 
Upvote 0
What sort of buttns..., userform,command, activeX, shapes?
your workbook on onedrive doesn't show any buttons !
 
Upvote 0
Rclick on one of them and tell us what it says in the name box (just above column "A")
 
Last edited:
Upvote 0
Try this

Code:
Sub MM1()
For Each cb In ActiveSheet.Buttons
    If TypeName(cb) = "Button" Then
        MsgBox cb.Name & " is located at " & cb.TopLeftCell.Address
    End If
Next cb
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,246
Members
452,623
Latest member
cliftonhandyman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top