Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/vba/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Excel VBA:我的SolverAdd没有添加我的约束_Excel_Vba - Fatal编程技术网

Excel VBA:我的SolverAdd没有添加我的约束

Excel VBA:我的SolverAdd没有添加我的约束,excel,vba,Excel,Vba,它添加了我的目标和变量范围。它不添加约束。我想不出来 SolverReset SolverOK setCell:=Range("Objective1"), _ maxMinVal:=1, _ byChange:=Range("VarChange1") SolverAdd cellRef:=Range("ExpenseSum1"), Relation:=1,

它添加了我的目标和变量范围。它不添加约束。我想不出来

 SolverReset
        SolverOK setCell:=Range("Objective1"), _
            maxMinVal:=1, _
            byChange:=Range("VarChange1")
        SolverAdd cellRef:=Range("ExpenseSum1"), Relation:=1, FormulaText:="allocationAmount"
        SolverAdd cellRef:=Range("VarChange1"), Relation:=1, FormulaText:="allocationDivided"
        SolverAdd cellRef:=Range("VarChange1"), Relation:=3, FormulaText:="Difference6"
        
        
        
        
        SolverSolve userFinish:=False