Question: VBA Excel I have this macro recorder using solver, every time I run it it shows a box sub or function not defined this is

VBA Excel

I have this macro recorder using solver, every time I run it it shows a box "sub or function not defined"

this is the code

Sub solverMacro()

'

' solverMacro Macro

'

'

SolverAdd CellRef:="$C$8:$E$8", Relation:=1, FormulaText:="$C$6:$E$6"

SolverAdd CellRef:="$C$12:$C$13", Relation:=1, FormulaText:="$E$12:$E$13"

SolverOk SetCell:="profit", MaxMinVal:=1, ValueOf:=0, ByChange:="$C$8:$E$8", _

Engine:=2, EngineDesc:="Simplex LP"

SolverSolve

End Sub

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!