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?
 

Some videos you may like

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

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
 

Watch MrExcel Video

Forum statistics

Threads
1,118,383
Messages
5,571,818
Members
412,420
Latest member
Quintankerus
Top