vba 无法运行宏 SOLVER.XLAM!Main。宏可能不可用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25586178/
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-12 04:25:47  来源:igfitidea点击:

Cannot Run Macro SOLVER.XLAM!Main. The macro may not be available

excel-vbaexcel-2007excel-2010vbaexcel

提问by Matt Cremeens

I wrote a macro that consolidates two files into one new file on excel 2007. I sent it to someone who tried to run it on his excel 2010 and he received the error in the Title of this question. We have tried to

我写了一个宏,在 excel 2007 上将两个文件合并为一个新文件。我将它发送给试图在他的 excel 2010 上运行它的人,他收到了这个问题标题中的错误。我们曾试图

  • make sure he had the Solver addin activated and a reference to it checked
  • pasted this in the immediate window application.run "solver.xlam!auto_open"
  • I tried to disable the Solver addin on my end, save and resend to him
  • make sure macros were enabled
  • 确保他激活了求解器插件并检查了对它的引用
  • 将此粘贴到直接窗口中 application.run "solver.xlam!auto_open"
  • 我试图禁用我的求解器插件,保存并重新发送给他
  • 确保启用了宏

The solver addin isn't even necessary for this program, as far as I can tell. I should mention that the macro works great on my excel 2007.

据我所知,这个程序甚至不需要求解器插件。我应该提到这个宏在我的 excel 2007 上效果很好。

Thoughts?

想法?

采纳答案by Matt Cremeens

SOLVED: The strangest thing happened. When the workbook got emailed the button the macro was originally assigned to got changed to solver.xlam. All I had to do was instruct him to reassign the button to my macro. How odd is that?! Curious if anyone else has experienced anything like that.

解决:最奇怪的事情发生了。当工作簿通过电子邮件发送时,宏最初分配给的按钮更改为solver.xlam。我所要做的就是指示他将按钮重新分配给我的宏。这有多奇怪?!好奇是否有其他人经历过类似的事情。