Function Obj_Fnc_Colmn(IN1 As Range, OP1 As Range)
Application.Run "Solver.xlam!Auto_Open"
SolverReset
X_var = IN1.Address
Y_var = OP1.Address
MsgBox X_var
SolverOK SetCell:=Y_var, MaxMinVal:=3, ValueOf:="0", ByChange:=X_var
SolverAdd CellRef:=X_var, Relation:=3, FormulaText:="0"
SolverSolve UserFinish:=False
End Function
程序的意图是输入不同的目标集,在多列中更改变量。
请仔细阅读我的代码。继续产生错误。同一个程序希望用于多个列。
答案 0 :(得分:0)
基于this,我会使用以下子句(我测试过它,是的,即使没有Application.Run行也能正常工作)...
using namespace std;
class CImage;
myfunction(hbitmap bmp)
{
CImage image;
image.Attach(bmp);
image.Save("filename.jpg");
}
注意事项:它不使用SolverReset。用于SetCell,ByChange和CellRef的字符串包含Sheet引用(不是绝对必要的,但有助于避免麻烦)。 ValueOf和FormulaText不是文本,而是数字。