vba Solver.xlam 丢失了?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24498020/
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
Solver.xlam is missing?
提问by TheTreeMan
I created a program in Excel 2010 on my PC that relies on the built-in solver for Excel. I made sure it worked on both Excel 2010 and Excel 2013 for PC. I then tried to use this same program on Excel 2011, and ran into an issue.
我在 PC 上的 Excel 2010 中创建了一个程序,该程序依赖于 Excel 的内置求解器。我确保它适用于 Excel 2010 和 Excel 2013 for PC。然后我尝试在 Excel 2011 上使用相同的程序,但遇到了问题。
When I tried to compile the project, it says "Compile Error: Can't find Project or Library".
当我尝试编译项目时,它显示“编译错误:找不到项目或库”。
I remembered this happening on the PC side before I enabled the solver, so I went into Tools -> Add-ins and then enabled the Solver.Xlam.
我记得在启用求解器之前在 PC 端发生过这种情况,所以我进入了工具 -> 加载项,然后启用了 Solver.Xlam。
However, I got the same exact error.
但是,我得到了完全相同的错误。
I went into the developer side, and went to Tools -> Reference, and found that Solver.Xlam is missing.
进入开发者端,进入Tools->Reference,发现Solver.Xlam不见了。
I realized that the address it thinks the solver is at is where the solver is on my PC, but not where it is on OSX. When I search on OSX I find the solver is at /Applications/Microsoft Office 2011/Office/Add-Ins
.
我意识到它认为解算器所在的地址是解算器在我的 PC 上的位置,而不是它在 OSX 上的位置。当我在 OSX 上搜索时,我发现求解器位于/Applications/Microsoft Office 2011/Office/Add-Ins
.
So I clicked "Browse" on the bottom and select Solver.Xlam.
所以我点击底部的“浏览”并选择 Solver.Xlam。
I select Solver.Xlam.
我选择 Solver.Xlam。
But now I get a different error.
但现在我得到了一个不同的错误。
After this error pops up, the location it is looking for Solver.Xlam at resets to the previous location.
弹出此错误后,它正在寻找 Solver.Xlam 的位置将重置为之前的位置。
What is the issue here? How do I go about solving this issue?
这里有什么问题?我该如何解决这个问题?
采纳答案by evenprime
Look up This linkto understand how it can be done
查找此链接以了解如何完成
But essentially you need to unload the addin and reload it , the following code will work
但本质上您需要卸载插件并重新加载它,以下代码将起作用
Sub InstallAddIn()
Installed = False 'to unload Add In
Installed = True 'to load Add In
Application.AddIns("AddIn Displayed Name").Installed = True ' or False
End Sub
回答by Michael
Had similar issues and couldn't FIND how to get SOLVER.xla or SOLVER.xlam back into the Tools refererence when opening in Excel 2013
在 Excel 2013 中打开时,遇到了类似的问题,并且无法找到如何将 SOLVER.xla 或 SOLVER.xlam 恢复到工具引用中
SOLUTION! I have been very stressed trying to get some VBA macros to work between Windows 7 to Windows 10. (Excel 2013). No amount of searching would work.
解决方案!我一直非常强调试图让一些 VBA 宏在 Windows 7 到 Windows 10 之间工作。(Excel 2013)。再多的搜索也行不通。
I had the "MISSING: SOLVER.XLAM" in the tools/references and couldn't find the NEW solver anywhere using any recommended paths.
我在工具/参考中有“缺少:SOLVER.XLAM”,但在使用任何推荐路径的任何地方都找不到新的求解器。
I finally: 1- Went to the Excel 2013 Application
我终于: 1- 去了 Excel 2013 应用程序
2 - Opened File/Options/Add-Ins
2 - 打开的文件/选项/加载项
3 - On the page with the add ins, I clicked on the bottom "Manage Excel Add-Ins" .. "Go..." and found 4 SOLVER related Add-ins there.
3 - 在带有加载项的页面上,我单击底部的“管理 Excel 加载项”..“转到...”并在那里找到了 4 个与 SOLVER 相关的加载项。
4 - Once these were activated, I was able to RETURN to VBA (Alt-F11) and then the "SOLVER" option was available in the Tools/References!! Added it - my macros now work fine
4 - 一旦这些被激活,我就可以返回到 VBA (Alt-F11),然后“求解器”选项在工具/参考中可用!!添加它 - 我的宏现在工作正常
回答by sridharnetha
I have performed below steps to fix Solver.xlam is missing
我已执行以下步骤来修复 Solver.xlam 丢失
1 - File -> Options -> Add-Ins
1 - 文件 -> 选项 -> 加载项
2 - Click on the add ins tab then select "Manage Excel Add-Ins" at the bottom --- "GO" Enable these 4 options -> OK
2 - 单击加载项选项卡,然后选择底部的“管理 Excel 加载项”---“开始”启用这 4 个选项 -> 确定
- Analysis Toolpack
- Analysis Toolpack-VBA
- Euro Currency Tool
- Solver Add-in
- 分析工具包
- 分析工具包-VBA
- 欧元货币工具
- 求解器插件
3 - After that you need to enable Solver reference.Tool -> Reference .. Solver Checkbox should select .
3 - 之后,您需要启用 Solver reference.Tool -> Reference .. Solver Checkbox 应选择 。
回答by nblitz
Maybe not relevant anymore, but for others facing this problem. There seem to be some problems with some users using the 64bit version of office with the solver. Uninstalling this version and downgrading to the 32bit version may solve the problem.
也许不再相关,但对于面临这个问题的其他人。一些用户使用 64 位版本的 office 和求解器似乎存在一些问题。卸载此版本并降级到32位版本可能会解决问题。
回答by Haekal
i used to be have a similar issue that i cant find solver.xlam file, so i try to redownload solver.xlam. and it worked, originally solver.xlam is located at c:/program files/microsoft office/office15/library/SOLVER/SOLVER.XLAM if your solver.xlam is not located there, than i think its better to redownload solver.xlam and put it there
我曾经有一个类似的问题,我找不到solver.xlam文件,所以我尝试重新下载solver.xlam。它起作用了,最初solver.xlam 位于c:/program files/microsoft office/office15/library/SOLVER/SOLVER.XLAM 如果您的solver.xlam 不在那里,那么我认为最好重新下载solver.xlam 和把它放在那里