Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best way to share/distribute Excel macro? [closed]

I wrote the macro in Excel and want to distribute it to the users. Once opened I want the macro to add itself as a toolbar and then to be always visible whenever the Excel is opened. So the macro can be conveniently accessed used from all workbooks.

like image 313
user652061 Avatar asked Sep 29 '11 11:09

user652061


People also ask

How do I share an Excel macro with others?

If you want to share your macros with someone else, you can copy it to the XLSTART folder on other computers, or copy some or all of its macros to the Personal. xlsb file on other computers. You can search for XLSTART in Windows Explorer to locate it.

Can I share the macro enabled Excel?

To share the macro with others, you will need to give them a copy of the Macro-Enabled workbook or Macro-Enabled document that has your macro. Simply choose File, Save As for the appropriate file, and be sure to change the file type to either Excel Macro-Enabled workbook or Word Macro-Enabled document.

Can macro run on closed workbook?

One way is to use the Workbook_BeforeClose event. This event occurs when the workbook is about to be closed. We can use this event to run a macro that will save the workbook in a certain format or close it without saving. Another way to run a macro when a workbook is closed is to use the Workbook_Deactivate event.

How do I share macros between computers?

If you have macros embedded in a specific document and would like to make them available for use in other Excel files you can download them one by one using the VBEditor in Excel. Move the PERSONAL. XLSB file to your new computer. You can do this by sending an email to yourself with the file attached.


1 Answers

IMHO, the easiest way is to create an add-in with your code and give it to the users.

See this link on ozgrid to learn how to build addins.

like image 103
JMax Avatar answered Sep 28 '22 02:09

JMax