共享/分发Excel宏的最佳方式是什么?

时间:2022-04-24 20:12:38

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.

我在Excel中编写了宏,并希望将其分发给用户。一旦打开,我希望宏将其自身添加为工具栏,然后在打开Excel时始终可见。因此可以方便地从所有工作簿中使用宏。

2 个解决方案

#1


14  

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.

请参阅ozgrid上的此链接以了解如何构建插件。

#2


1  

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.

对于Sub与工具栏绑定,Addin - 正如JMax所说 - 将是我的选择。对于特定于您的业务的公式,放置在Autostart文件夹中的常规空Excel文件包含一个或多个包含Function Xxx()的模块就足够了。

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

我正在使用后者进行IP地址计算

#1


14  

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.

请参阅ozgrid上的此链接以了解如何构建插件。

#2


1  

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.

对于Sub与工具栏绑定,Addin - 正如JMax所说 - 将是我的选择。对于特定于您的业务的公式,放置在Autostart文件夹中的常规空Excel文件包含一个或多个包含Function Xxx()的模块就足够了。

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

我正在使用后者进行IP地址计算