PDA

View Full Version : Compile Error in MS Excel 2007



wz72n01
10-21-2007, 08:40 AM
I get this message: Sub or Function Not Defined

Sub Eff0()
'to return an efficient portfolio for given target return

SolverReset
Call SolverAdd(Range("portret1"), 2, Range("target1"))
Call SolverOk(Range("portsd1"), 2, 0, Range("change1"))
Call SolverSolve(True)
SolverFinish
End Sub

When I go to Tools and References in the VBA screen to select Solver, I cannot!!! The 'References..." is grayed out.

How do I get it to call solver? Thanks

Zack Barresse
10-21-2007, 10:33 AM
Hello there,

Make sure you are not running any code, no userforms are loaded, or the project is not protected.