ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I create a macro that will activate the solver? (https://www.excelbanter.com/excel-programming/320623-how-do-i-create-macro-will-activate-solver.html)

Hjalti

How do I create a macro that will activate the solver?
 
I have tried to record this and been exploring the help in Visual Basic but
nothing that I find is working.. The macro debugger always stops at the
solver line reports this message " Compile error: Sub or function not
defined"

Best regards
Hjalti
from Iceland

Fredrik Wahlgren

How do I create a macro that will activate the solver?
 

"Hjalti" wrote in message
...
I have tried to record this and been exploring the help in Visual Basic

but
nothing that I find is working.. The macro debugger always stops at the
solver line reports this message " Compile error: Sub or function not
defined"

Best regards
Hjalti
from Iceland


Is this what you want?

Sub Makro1()
AddIns("Solver").Installed = True
End Sub

In my version of Excel, the solver is called "Problemlösaren".
/Fredrik



Tom Ogilvy

How do I create a macro that will activate the solver?
 
You have to create a reference to it (solver) in the VBE
(Tools=References).

--
Regards,
Tom Ogilvy

"Hjalti" wrote in message
...
I have tried to record this and been exploring the help in Visual Basic

but
nothing that I find is working.. The macro debugger always stops at the
solver line reports this message " Compile error: Sub or function not
defined"

Best regards
Hjalti
from Iceland




Hjalti

How do I create a macro that will activate the solver?
 
I am not making progress and there for I am asking you guys if you have som
solver macro written on your pc if you could send me the whole programing?

I would be very grateful for that
thanks
Hjalti

"Fredrik Wahlgren" wrote:


"Hjalti" wrote in message
...
I have tried to record this and been exploring the help in Visual Basic

but
nothing that I find is working.. The macro debugger always stops at the
solver line reports this message " Compile error: Sub or function not
defined"

Best regards
Hjalti
from Iceland


Is this what you want?

Sub Makro1()
AddIns("Solver").Installed = True
End Sub

In my version of Excel, the solver is called "Problemlösaren".
/Fredrik





All times are GMT +1. The time now is 11:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com