Cannot run the macro 'SOLVER.XLAM!MainEx'.

I need to use the solver add-in for my class, recently I got an error in excel saying I ran out of memory. Forums told me to repair MS office and that would fix the problem, which it did, but now I cannot use the solver add in at all. Every time I try to use it I get an error: Cannot run the macro 'SOLVER.XLAM!MainEx'. The macro may not be available in this workbook or all macros may be disabled. 


When I went into the tools (after pressing alt f11) it looks like it's still selected. Going into the solver itself requires a password. Please help me. The solver is absolutely essential to my class!

I'm using office 2010 on a windows 7 computer. 

***Post moved by the moderator to the appropriate forum category.***

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

Interesting development, I got the solver to work but it "exhausted" all the memory I could use. I don't know what to do. 

4 people were helped by this reply

·

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

are you using solver through macros ?, if so...

 

op1: open and use solver thru GUI before use your vba procedures

 

op2:

a) open VBE (Alt+F11)

b) be sure references are set to SOLVER.XLAM (NOT *.DLL)

c) show immediate code pane (Ctrl+G)

d) copy/paste (or write): application.run "solver.xlam!auto_open"

 

if any doubt (or further information), would you please comment ?

regards,

hector.

10 people were helped by this reply

·

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

Hi,

I ran into the same issue and solved it doing some weird things.

First I downloaded and installed OpenSolver. Loading this in the Office 2013 version of Excel caused major issues, but "unloading" it made it so that the "Cannot run the macro 'SOLVER.XLAM!SolverLabel'" issues got fixed when clicking the Data tab for the first time. 

Solver still did not work at this point, but loading the Add-in "Analysis Toolpak - VBA" now allows solver to work. I do not know if loading and unloading the OpenSolver Add-in was helpful, because I did not try doing that before loading OpenSolver. And I REALLY do not want to try to reproduce the error.

6 people were helped by this reply

·

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

Hi, I follow the steps but still can't use the solver and displayed the same error: Cannot run the macro 'SOLVER.XLAM!MainEx' 

45 people were helped by this reply

·

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

Hi,

I ran into the same issue and solved it doing some weird things.

First I downloaded and installed OpenSolver. Loading this in the Office 2013 version of Excel caused major issues, but "unloading" it made it so that the "Cannot run the macro 'SOLVER.XLAM!SolverLabel'" issues got fixed when clicking the Data tab for the first time. 

Solver still did not work at this point, but loading the Add-in "Analysis Toolpak - VBA" now allows solver to work. I do not know if loading and unloading the OpenSolver Add-in was helpful, because I did not try doing that before loading OpenSolver. And I REALLY do not want to try to reproduce the error.

Hi,

Same thing happened to me. Installed OpenSolver and it gave me the option to enable the macros.

Solved it and can use the solver now, did it the same way you did.

2 people were helped by this reply

·

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

I had a similar problem.  Every time I had the Solver Add-in checked in options I would get this error message:  "Cannot run the macro "SOLVER:XLAM!GetSolverLabel". The macro may not be available in this workbook or all macros may be disabled."   

I had installed Office 16 Preview.  According to Frontline Solutions (maker of Solver), it is not compatible yet (as of June 2015).  I reinstalled Excel 2013 and was not able to get Solver to work.  I reinstalled, repaired, deleted the Solver Files, all to no avail.  

I gave up and was going back to Excel 2010.  2016 had disabled 2010.  

Reinstalling 2010 FIXED Solver for 2010 and Excel 2013!!!

17 people were helped by this reply

·

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

 Hi, I followed your instruction as above, but after :  application.run "solver.xlam!auto_open"

Still got the notice that: Error, solver cannot run...

Why?

Thanks!

are you using solver through macros ?, if so...

op1: open and use solver thru GUI before use your vba procedures

op2:

a) open VBE (Alt+F11)

b) be sure references are set to SOLVER.XLAM (NOT *.DLL)

c) show immediate code pane (Ctrl+G)

d) copy/paste (or write): application.run "solver.xlam!auto_open"

if any doubt (or further information), would you please comment ?

regards,

hector.

111 people were helped by this reply

·

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

i got this weird problem in office 2016 64bit, i try installing office 2013 64 bitS but this didnt solve problem.  i read somewhere that it is incompatibility problem, so i decided install office 2016 32bit and now SOLVER WORKS FINE!

12 people were helped by this reply

·

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

I think I found a potential solution? Although it might not be for everyone, because it involves completely uninstalling all Office products from your computer. Make sure you have your product key!

The easiest way to do this is to use the "Uninstall Office 2016, Office 2013, or Office 365 from a PC" easy removal tool at this link: 

https://support.office.com/en-us/article/Uninstall-Office-2016-Office-2013-or-Office-365-from-a-PC-9dd49b83-264a-477a-8fcc-2fdf5dbf61d8

Simply run the removal tool, restart your computer, and re-install Office. Works like a charm! ^_^

I think this error occurs because PCs these days have a **** Office-trial-thing preinstalled, and when you install your copy there's a conflict? Idk though...

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

Hi, Thanks for your solution.

When I run the code you entered, I get:

"runtime error 1004"

Is there any solution for that?

1 person was helped by this reply

·

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

* Please try a lower page number.

* Please enter only numbers.

* Please try a lower page number.

* Please enter only numbers.

 
 

Question Info


Last updated October 22, 2020 Views 45,660 Applies to: