求教!pb怎么调用excel的规划求解(solver),请各位帮帮忙!
已经装了规划求解的插件,在vba也可以运行,就是在pb调用报错,不知怎么调用?
vba代码:
Range("A6").Select
SolverOk SetCell:="$A$6", MaxMinVal:=2, ValueOf:="0", ByChange:="$A$5:$E$5"
SolverAdd CellRef:="$G$2", Relation:=3, FormulaText:="$F$2"
SolverAdd CellRef:="$G$3", Relation:=3, FormulaText:="$F$3"
SolverAdd CellRef:="$G$4", Relation:=3, FormulaText:="$F$4"
SolverAdd CellRef:="$A$5", Relation:=3, FormulaText:="0"
SolverAdd CellRef:="$B$5", Relation:=3, FormulaText:="0"
SolverAdd CellRef:="$C$5", Relation:=3, FormulaText:="0"
SolverAdd CellRef:="$D$5", Relation:=3, FormulaText:="0"
SolverAdd CellRef:="$E$5", Relation:=3, FormulaText:="0"
SolverAdd CellRef:="$A$5", Relation:=4, FormulaText:="整数"
SolverAdd CellRef:="$B$5", Relation:=4, FormulaText:="整数"
SolverAdd CellRef:="$C$5", Relation:=4, FormulaText:="整数"
SolverAdd CellRef:="$D$5", Relation:=4, FormulaText:="整数"
SolverAdd CellRef:="$E$5", Relation:=4, FormulaText:="整数"