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?

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
TheTreeMan
  • 913
  • 8
  • 23
  • 38
  • Uncheck the Missing one first then check the new Solver reference – Ravi Yenugu Jun 30 '14 at 20:04
  • Oh wow, it ends up being that simple! Is there any way to make that change for every single excel program? As it is, I have to go in and change it manually every single time. – TheTreeMan Jun 30 '14 at 20:09

6 Answers6

5

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

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.

I had the "MISSING: SOLVER.XLAM" in the tools/references and couldn't find the NEW solver anywhere using any recommended paths.

I finally: 1- Went to the Excel 2013 Application

2 - Opened File/Options/Add-Ins

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.

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

Michael
  • 51
  • 1
  • 1
2

Look up This link to 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
Community
  • 1
  • 1
Ravi Yenugu
  • 3,895
  • 5
  • 40
  • 58
0

I have performed below steps to fix Solver.xlam is missing

1 - File -> Options -> Add-Ins

2 - Click on the add ins tab then select "Manage Excel Add-Ins" at the bottom --- "GO" Enable these 4 options -> OK

  • Analysis Toolpack
  • Analysis Toolpack-VBA
  • Euro Currency Tool
  • Solver Add-in

3 - After that you need to enable Solver reference.Tool -> Reference .. Solver Checkbox should select .

sridharnetha
  • 2,104
  • 8
  • 35
  • 69
  • What does this add that isn't already included in the answers? It's practically a verbatim copy of the most recent answer from *ten* months ago. – TylerH Jun 02 '16 at 06:19
  • @TylerH my 3rd point option is not there at the answer, so i have added another answer so it may help to someone. – sridharnetha Jun 16 '16 at 05:38
0

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.

nblitz
  • 19
  • 2
0

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

Haekal
  • 1
0

I solved it using the following solution - Analysis/Solver install problem

Simply used the installation disc to add the Office Shared Features > Visual Basic for Applications (MAKE SURE THIS IS SET TO "RUN FROM MY COMPUTER"

Niv
  • 850
  • 1
  • 7
  • 22