6

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.

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.

Picture of the enabled 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.

Picture of the missing 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.

So I clicked "Browse" on the bottom and select Solver.Xlam.

Selecting Solver.Xlam

I select Solver.Xlam.

Solver.Xlam is now selected

But now I get a different error.

Error

After this error pops up, the location it is looking for Solver.Xlam at resets to the previous location.

What is the issue here? How do I go about solving this issue?

4

6 回答 6

5

有类似问题,在 Excel 2013 中打开时无法找到如何让 SOLVER.xla 或 SOLVER.xlam 回到工具参考中

解决方案!我一直在试图让一些 VBA 宏在 Windows 7 到 Windows 10 之间工作时压力很大。(Excel 2013)。再多的搜索也行不通。

我在工具/参考中有“MISSING:SOLVER.XLAM”,并且无法使用任何推荐的路径在任何地方找到新的求解器。

我终于:1-去了Excel 2013应用程序

2 - 打开的文件/选项/加载项

3 - 在带有加载项的页面上,我单击底部的“管理 Excel 加载项”..“开始...”并在那里找到 4 个与 SOLVER 相关的加载项。

4 - 一旦这些被激活,我就能够返回到 VBA (Alt-F11),然后工具/参考中的“求解器”选项可用!!添加它 - 我的宏现在可以正常工作

于 2015-08-22T14:09:18.487 回答
2

查找此链接以了解如何完成

但本质上您需要卸载插件并重新加载它,以下代码将起作用

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
于 2014-06-30T20:12:18.337 回答
0

我曾经有一个类似的问题,我找不到solver.xlam 文件,所以我尝试重新下载solver.xlam。并且它起作用了,如果您的solver.xlam不在那里,最初solver.xlam位于c:/program files/microsoft office/office15/library/SOLVER/SOLVER.XLAM,我认为重新下载solver.xlam和放在那里

于 2019-07-18T02:36:27.790 回答
0

我已执行以下步骤来修复 Solver.xlam 丢失

1 - 文件 -> 选项 -> 加载项

2 - 单击加载项选项卡,然后选择底部的“管理 Excel 加载项”---“开始”启用这 4 个选项 -> 确定

  • 分析工具包
  • 分析工具包-VBA
  • 欧元货币工具
  • 求解器插件

3 - 之后,您需要启用 Solver reference.Tool -> Reference .. Solver Checkbox 应该选择 。

于 2016-06-02T06:09:52.590 回答
0

也许不再相关,但对于其他面临这个问题的人。某些用户使用 64 位版本的 office 与求解器似乎存在一些问题。卸载此版本并降级到 32 位版本可能会解决问题。

于 2019-04-03T13:29:45.620 回答
0

我使用以下解决方案解决了它 - 分析/求解器安装问题

只需使用安装光盘添加 Office 共享功能 > Visual Basic for Applications(确保将其设置为“从我的计算机运行”

于 2020-10-23T18:37:17.020 回答