问题
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.
回答1:
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.
回答2:
For Sub's tied to toolbars an Addin - as said by JMax - would be my choice. For formulae specific to your business a regular empty Excel file with one or more modules containing Function Xxx(), placed in the Autostart folder would be sufficient.
A server directory which is added to the user's path of Autostart folders is an easy way to auto-distribute formulae.
I am using the latter for instance for IP address calculations
来源:https://stackoverflow.com/questions/7596623/what-is-the-best-way-to-share-distribute-excel-macro