0

I want to automate a series of solver operations in a VBA macro in Excel 2016 for mac. However, when I run the macro an error keeps popping up. The error I get is "Sub of function not defined". The code I use is the following.

Sub test_test_test()
'
' test_test_test Macro
'
    SolverOk SetCell:="$K$3", MaxMinVal:=3, ValueOf:=-20, ByChange:="$K$3", Engine:=1, EngineDesc:="GRG Nonlinear"
    SolverSolve

End Sub

Thanks a lot! Lennart

2

1 Answer 1

2

You should add solver to references.

To do so, open visual basic editor. There is "Add References ...." button on bottom left of the editor. Click it, check the box for Solver, then click OK. This should work.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.