ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Solver Macro (https://www.excelbanter.com/excel-programming/404216-solver-macro.html)

Diogo

Solver Macro
 
Hi

New doubt!

Just recorded this simple Macro:

Sub Datinfor()
'
' Datinfor Macro
' Macro recorded 14-01-2008 by dbranco
'

'
SolverOk SetCell:="$D$27", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$D$6:$D$12,$D$14:$D$19,$D$22:$D$25"
SolverSolve
End Sub


It returns me the following:

Compile error: Sub or Function not defined

Highlighting the "SolverOk" portion of the Macro.

Could someone help?

Thanks

Diogo

Solver Macro
 
Forget it everyone

Just solved the problem:

In the VBA editor:
Tools
References
Solver add-in

"Diogo" wrote:

Hi

New doubt!

Just recorded this simple Macro:

Sub Datinfor()
'
' Datinfor Macro
' Macro recorded 14-01-2008 by dbranco
'

'
SolverOk SetCell:="$D$27", MaxMinVal:=3, ValueOf:="0", ByChange:= _
"$D$6:$D$12,$D$14:$D$19,$D$22:$D$25"
SolverSolve
End Sub


It returns me the following:

Compile error: Sub or Function not defined

Highlighting the "SolverOk" portion of the Macro.

Could someone help?

Thanks



All times are GMT +1. The time now is 03:10 AM.

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