ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sharing Macros (https://www.excelbanter.com/excel-programming/373910-sharing-macros.html)

Brad

Sharing Macros
 
This is a two part question. I have created several macros to run on a
spreadsheet.
Q1 - how do I combine all these seperate macros to run sequentially together
at the press of a customized toolbar button. ( I know how to create the
button).

Q2 - once I combine the macros into a Run all type button how do I share
this (or these) macros across my department?

Allllen

Sharing Macros
 
A1 - write a new macro called "SuperMacro"

Sub SuperMacro()
call Macro1
call Macro2
call Macro3
'etc
End Sub

A2 - save your file as an add-in. Post it on the network and let people
download it themselves. You will want to check it very thoroughly first.

--
Allllen


"Brad" wrote:

This is a two part question. I have created several macros to run on a
spreadsheet.
Q1 - how do I combine all these seperate macros to run sequentially together
at the press of a customized toolbar button. ( I know how to create the
button).

Q2 - once I combine the macros into a Run all type button how do I share
this (or these) macros across my department?


Wild Jim

Sharing Macros
 
In answer to Q2, I save my macros in separate shared spreadsheets on
the network. People link their buttons to run the macro in the
workbooks. This way, I can have the same macro run by many different
people at the same time and I can have a development version, which I
can test and develop before promoting it to the final finished version
(saving it over the previous version). By saving it as the same named
file, people do not have to change their buttons - they just click the
same button to run the updated macro.

Also by sharing the workbook, no one else can see the code!

I always have an auto close statement on the macro spreadsheet as well,
so no one actually sees the macro spreadsheet open.

Hope that helps, but your question 2 is something I have been wanting
to ask too - If anyone has a better way, I would be pleased to hear and
try it.




Brad wrote:
This is a two part question. I have created several macros to run on a
spreadsheet.
Q1 - how do I combine all these seperate macros to run sequentially together
at the press of a customized toolbar button. ( I know how to create the
button).

Q2 - once I combine the macros into a Run all type button how do I share
this (or these) macros across my department?




All times are GMT +1. The time now is 09:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com