placing shortcut button to macro on worksheet

bigmacneb

Board Regular
Joined
Jul 12, 2005
Messages
93
I have a macro which is specific to one sheet in a workbook. i would like to place a button on the worksheet which is the shortcut to running the Macro.

I have placed a button onto excel which is universal across all worksheets in the book, however I have 6 sheets and six different macros.

Is it possible to do this?
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
Place the code in the WorkSheet Module for the specific sheet
Right click sheet tab. Choose view code

lenze
 

bigmacneb

Board Regular
Joined
Jul 12, 2005
Messages
93
Lenze thanks, is that the easiest way to run the code for that worksheet. I have 20 users on this workbook and funny as it sounds to us, they will not understand that.
They are very simple and want a button to push.
 

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
You can still use a button to call the macro, but after thinking about this, I don't really see a problem doing it just like you did before, no matter where the code is placed. If the macro is sheet specific and the button is only on that sheet, there should be no problem.

lenze
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,999
Messages
5,834,813
Members
430,323
Latest member
Regash

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
Top