vba 发送带有包含宏的 Excel 文件的电子邮件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12598626/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-11 17:52:05  来源:igfitidea点击:

Send an email with a excel file that includes a macro

excelexcel-vbavba

提问by Mr.B

I created an excel file where I added some buttons that I connected to different macros. I want to send this excel file to a collegue but when he opens this file the button gives an error:

我创建了一个 excel 文件,在其中添加了一些连接到不同宏的按钮。我想将此 Excel 文件发送给一位同事,但当他打开此文件时,按钮出现错误:

Cannot run the macro "macro-name". The macro may not be available in this workbook or all macros may be disabled.

无法运行宏“宏名称”。宏在此工作簿中可能不可用,或者可能禁用了所有宏。

Is there a way to include or insert macro's inside the excel file?

有没有办法在excel文件中包含或插入宏?

[I use Microsoft Office Professional Plus 2010]

[我使用的是 Microsoft Office Professional Plus 2010]

回答by Mr.B

Found the answer myself, sorry:

自己找到了答案,抱歉:

Save as.. "Excel Macro-Enabled Workbook (*.xlsm)

另存为.."Excel 启用宏的工作簿 (*.xlsm)