Home |
Search |
Today's Posts |
#1
|
|||
|
|||
run macros automatically
i have got around 10 macros in a excel spreadsheet. i want all of them to run
when i open the file. or there should be a button which will runs all the macros whenever the user wants. |
#2
|
|||
|
|||
You can do it either way really,
First create a new macro, that runs all the ten macros that are in your workbook. If you want this macro to run whenever the sheet is opened, save it with the name 'Auto_Exec' and it will run automatically when you open the book. If you want to execute the macro on a button press, you can call it any name you wish. Next you will need to create a new button, so go to the 'View' menu, select 'Toolbars', then the 'Form' toolbar. From the toolbar now displayed, click on the 'button' icon and create a new button on your sheet. You will see a dialog sking you which macro you want to link this button to, just select your macro that you created above, and everything should work just fine. HTH Neil www.nwarwick.co.uk "saunak" wrote: i have got around 10 macros in a excel spreadsheet. i want all of them to run when i open the file. or there should be a button which will runs all the macros whenever the user wants. |
#3
|
|||
|
|||
Call it Auto_Open, not Auto_Exec.
-- HTH Bob Phillips "Neil" wrote in message ... You can do it either way really, First create a new macro, that runs all the ten macros that are in your workbook. If you want this macro to run whenever the sheet is opened, save it with the name 'Auto_Exec' and it will run automatically when you open the book. If you want to execute the macro on a button press, you can call it any name you wish. Next you will need to create a new button, so go to the 'View' menu, select 'Toolbars', then the 'Form' toolbar. From the toolbar now displayed, click on the 'button' icon and create a new button on your sheet. You will see a dialog sking you which macro you want to link this button to, just select your macro that you created above, and everything should work just fine. HTH Neil www.nwarwick.co.uk "saunak" wrote: i have got around 10 macros in a excel spreadsheet. i want all of them to run when i open the file. or there should be a button which will runs all the macros whenever the user wants. |
#4
|
|||
|
|||
Oops, slipped into Access mode there, sorry if I caused any confusion!
"Bob Phillips" wrote: Call it Auto_Open, not Auto_Exec. -- HTH Bob Phillips "Neil" wrote in message ... You can do it either way really, First create a new macro, that runs all the ten macros that are in your workbook. If you want this macro to run whenever the sheet is opened, save it with the name 'Auto_Exec' and it will run automatically when you open the book. If you want to execute the macro on a button press, you can call it any name you wish. Next you will need to create a new button, so go to the 'View' menu, select 'Toolbars', then the 'Form' toolbar. From the toolbar now displayed, click on the 'button' icon and create a new button on your sheet. You will see a dialog sking you which macro you want to link this button to, just select your macro that you created above, and everything should work just fine. HTH Neil www.nwarwick.co.uk "saunak" wrote: i have got around 10 macros in a excel spreadsheet. i want all of them to run when i open the file. or there should be a button which will runs all the macros whenever the user wants. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Enable macros automatically for a workbook | Excel Discussion (Misc queries) | |||
Enabling macros | Excel Discussion (Misc queries) | |||
sorting with macros | Excel Discussion (Misc queries) | |||
Transferring toolbars and macros to other computers | Excel Discussion (Misc queries) | |||
Macros disappear after a file is imported | Excel Discussion (Misc queries) |