Results 1 to 7 of 7

Solver... compile error

Threaded View

  1. #1
    Forum Contributor
    Join Date
    04-19-2009
    Location
    Toulouse, France
    MS-Off Ver
    Excel 2010
    Posts
    130

    Solver... compile error

    hi all have the following code and as usual can't figure out where the problem is. getting compile error sub or function not defined. any help appreciated.
    Regards
    Dan

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Range("J14").Value = "y" Then
    Call Freeme
    End If
    End Sub
    Sub Freeme()
    
     
        SolverReset
        SolverOk SetCell:="$N$32", _
        MaxMinVal:=2, _
        ValueOf:=0, _
        ByChange:="$G$22:$L$22", _
            Engine:=1, _
            EngineDesc:="GRG Nonlinear"
        SolverAdd CellRef:=Range("$G$22:$L$22"), Relation:=1, FormulaText:="20"
        SolverAdd CellRef:=Range("$G$22:$L$22"), Relation:=3, FormulaText:="2"
        SolverAdd CellRef:=Range("$M$15:$M$22"), Relation:=3, FormulaText:="0"
        SolverSolve
        SolverSolve UserFinish:=True
        SolverFinish KeepFinal:=1
    End Sub
    Last edited by Cicada; 04-25-2012 at 12:32 PM. Reason: Solved

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1