动态地将宏插入到一个新的excel工作簿中 [英] Dynamically insert macro into a new excel workbook

查看:191
本文介绍了动态地将宏插入到一个新的excel工作簿中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想创建一个新的 WorkBook vba ),然后放置一个宏进入新的WorkBook。

解决方案

JMax提到的两个选项:



hard way





简单方法




  • 将您现有的工作簿与UserForm作为模板创建新的WorkBook


    1. 保存现有工作簿(保存当前文件)

    2. 剥离任何不需要的工作表

    3. 如果您需要删除任何代码,那么您有效地返回f第一个选项,因为您将需要Pearson的从项目中删除模块/从模块中删除过程

    4. 另存为新文件




我们需要查看您的工作簿样本以提供进一步的详细帮助。


How can an existing macro be inserted into a new excel workbook?

I want to create a new WorkBook (with ), and then place an existing macro into the new WorkBook.

解决方案

The two options that JMax mentioned:

"hard way"

"easy way"

  • Use your existing workbook with the UserForm as a template to create the new WorkBook

    1. Save the existing workbook as is (to preserve your current file)
    2. Strip out any unwanted sheets
    3. If you need to strip out any code then you are effectively back to the first option as you will need Pearson's Deleting A Module From A Project / Deleting A Procedure From A Module
    4. Save as a new file

We would need to see a sample of your workbook to provide further detailed help.

这篇关于动态地将宏插入到一个新的excel工作簿中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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