独立Excel宏 [英] Stand Alone Excel Macro

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

问题描述

我有一个报告,我每周从系统中运行一次,并将数据导出到Excel文档中。我已经设置了将数据导出为ex​​cel的工具,以便在格式化方面做一个体面的工作,但是一旦数据在excel中,我还需要做更多的工作。



是否可以创建一个独立的宏,将其保存在Microsoft Office文件夹中,并在打开此文件后能够调用它?我已经写了大量的宏,它是一个给定的电子表格的一部分,但是从来没有尝试过许多电子表格的宏。



是可能的,一个起始的方向是好的资源在哪里可以学到如何实现这一目标?谢谢。

解决方案


...我打开这个文件后可以调用它吗? ...


您有2个非常好的选择



1)将您的宏写入并保存到个人文件。有关详细信息,请参阅此链接



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



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



从上述链接引用


<你有没有想在所有的Excel工作表中使用那个非常方便的宏?您可以。此列说明如何将宏放置在名为personal.xls的文件中,并在每次启动Excel时将其放置。


2)创建加载项



主题:创建Excel加载项



链接 http://msdn.microsoft.com/en-us/library/aa140936%28v=office.10%29.aspx



从上述链接引用


您可以通过创建一个工作簿来创建一个Microsoft®Excel加载项,向其添加代码和自定义工具栏和菜单项,并将其保存为Excel加载项文件。



I have a report that I run from a system once a week, and the data is exported into an excel document. I have set up the tool that exports the data to excel to do a decent job on formatting, but there is still more that I need to do once the data is in excel.

Is it possible to create a stand alone macro, save it in a Microsoft office folder and be able to call it after I open this file? I have written plenty of macros that are part of ONE given spreadsheet, but never tried one that was open to many spreadsheets.

IS it possible, and a starting direction of good resources of where I can learn how to achieve this goal? Thank you.

解决方案

...and be able to call it after I open this file?...

You have 2 very good options

1) Write and save your macro to Personal file. See this link for more information

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

Quote from the above link:

Have you ever wanted to use that really handy macro in all of your Excel worksheets? You can. This column explains how to place your macros in a file called personal.xls and make them available each time you start Excel.

2) Create an Add-In

Topic: Creating an Excel Add-in

Link: http://msdn.microsoft.com/en-us/library/aa140936%28v=office.10%29.aspx

Quote from the above link:

You create a Microsoft® Excel add-in by creating a workbook, adding code and custom toolbars and menu items to it, and saving it as an Excel add-in file.

这篇关于独立Excel宏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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