Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial Accounting

Authors: Robert Kemp, Jeffrey Waybright

2nd edition

978-0132771801, 9780132771580, 132771802, 132771586, 978-0133052152

Students also viewed these Finance questions