Consulting

Results 1 to 2 of 2

Thread: Compile Error in MS Excel 2007

  1. #1
    VBAX Regular
    Joined
    Jul 2007
    Posts
    20
    Location

    Exclamation Compile Error in MS Excel 2007

    I get this message: Sub or Function Not Defined

    [VBA]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[/VBA]

    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

  2. #2
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location
    Hello there,

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •