VBA代码导入 [英] VBA code import

查看:137
本文介绍了VBA代码导入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个VBA项目,我正在做excel。我将有许多工作簿将使用相同的代码,如果我做出改变,我不想将代码复制到所有的工作簿。有没有将代码放在一个中心位置,然后让所有的工作簿访问该代码?

解决方案

是的,您有两个选项



1 )



更多细节



主题:从中央文件部署您的Excel宏



链接 http://office.microsoft.com/en-我们/ excel-help / deploy-your-excel-macros-from-a-central-file-HA001087296.aspx



2)创建一个加载项



此处的模式详细信息



主题:创建XLA添加 - 在Excel中



链接 http://www.cpearson.com/excel/createaddin.aspx



注意:您可以在VBA以及Visual Studio中创建加载项。对于COM加载项(使用Visual Studio创建),请参阅此链接。



主题:使用Visual Studio(VSTO)进行Office开发



链接 http://msdn.microsoft.com/en-us/office/hh133430



HTH



Sid


I have a VBA project I am doing in excel. I will have many workbooks that will use the same code and I do not want to have to copy the code to all the workbooks if I make a change. Is there anyway to have the code in one central place and then have all the workbooks access that code?

解决方案

Yes, you have two options

1) Copy and paste the code in the Personal workbook.

More details here

Topic: Deploy your Excel macros from a central file

Link: http://office.microsoft.com/en-us/excel-help/deploy-your-excel-macros-from-a-central-file-HA001087296.aspx

2) Create an Add-In

Mode details here

Topic: Creating An XLA Add-In For Excel

Link: http://www.cpearson.com/excel/createaddin.aspx

Note: You can create Add-In in VBA as well as Visual Studio. For COM Add-Ins (created using Visual Studio), please refer to this link.

Topic: Office Development with Visual Studio (VSTO)

Link: http://msdn.microsoft.com/en-us/office/hh133430

HTH

Sid

这篇关于VBA代码导入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆