Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Which Macro is button associated?

0

Hello, easy question - how can you identify which code is associated with a button that runs a macro?  I've made buttons and assigned macros and then come back months later to revise and don't know which sub its assigned to.  This must be something obvious that I'm not aware of.  Thanks.

Answer
Discuss

Answers

0
Selected Answer

Hello again Susan,

I too have been faced with this quandry in the past. It's actually quite easy to learn which macro is associated with a button. Move the mouse pointer over the button then right click and select "Assign Macro" from the drop down. At the top of the window which opens the macro will be listed. The name of the workbook will preceed the macro name (eg: 'My Test Workbook.xlsm'!My_Macro_Test). From this window you can click on "Edit" to make changes. If you want to have a different macro simply just select it from the list of available macros. Macros for worksheet events will not be listed; those must be accessed from the VB Editor (right click the sheet tab and select "View Code")

Hope this helps.

Cheers   :-)

Discuss

Discussion

Thanks WillieD24.  I'm glad I'm not alone !
SusanUser (rep: 16) Mar 18, '24 at 2:31 pm
@Susan

Thanks for selecting my answer; glad I could help you.
The amazing thing about Excel and VBA is the learning curve never ends. For most people, they only (regularly) use about 20% of the capabilities; the other 80% they need to refer to this forum or a "cheat sheet" of some sort.
WillieD24 (rep: 557) Mar 18, '24 at 4:03 pm
Add to Discussion


Answer the Question

You must create an account to use the forum. Create an Account or Login