尝试使用VBA将模块导入personal.xlsb [英] Trying to Use VBA to import a module into personal.xlsb

查看:451
本文介绍了尝试使用VBA将模块导入personal.xlsb的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试找一个简单的代码将模块导入个人宏文件。 我有几个其他用户需要访问我创建的一些宏,而无需打开"宏文件"。每次他们想要运行它们。 我有
在其他论坛上遇到过这种代码:

I'm trying to find a simple code to import a module into a personal macros file.  I have several other users who need to access some macros I have created, without having to open a "macros file" every time they want to run them.  I have come across this kind of code on other forums:

ActiveWorkbook.VBProject.VBComponents.Import(" c:\ exportedmodule.bas")

ActiveWorkbook.VBProject.VBComponents.Import ("c:\exportedmodule.bas")

这会将模块导入到他们当前处于活动状态的任何文件中,但我希望能够将其专门导入到personal.xlsb中一次,并完成它,我找不到正确的代码。 任何帮助将不胜感激。

This will import the module into whatever file they currently have active, but I want to be able to import specifically into personal.xlsb one time, and be done with it, and I can't find the correct code for this.  Any help would be appreciated.

推荐答案

这不是好方法。

This is not good way.

你不能拥有两个或多个程序同名。在代码复制之前,您应该在存储库中查看它以进行删除。所以最好的方法是分发addinn(XLAm或COM / VSTO通过安装文件) 

You cant have two or more procedures same name. You should to look it in repository to delete before code'll copy. So the best way is distribute addinn (XLAm or COM/VSTO thru install file) 


这篇关于尝试使用VBA将模块导入personal.xlsb的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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