### 紧急求助

我是个新手，现在我遇到挤手间题，请求各位老师帮助

CalcFunc  （是CELL的自身事件）
begin
调用另外的一个程序返回结果
p1 = ...
p2 = ...
ret = calc(p1,p2)
SetFuncResult nVar,sVar,nType
end
程序会重复执行CalcFunc

....
Cell.SetFormula(1,2,0,“calc('102',1)”)  '会调用Cell_CalcFunc进行计算
Cell.SetFormula(2,2,0,“calc('101',1)”)  '会调用Cell_CalcFunc进行计算
end sub

sub Cell_CalcFunc(ByVal name, ByVal rettype, ByVal paranum)
dim sVar , nVar ,lp
sVar = ""
nVar = 0
lp = 0
if ucase(name)="CALC" then
bm = Cell.GetFuncStringPara(0,lp)
sfunc = CInt(JtpCell.GetFuncDoublePara(1,lp))
fp2.action = "bb_hide_calc.jsp?funcname="&name&"&bm="&bm&"&sfunc="&sfunc
fp2.submit
end if
end sub

sub setValue(nVar, sVar,nType)
Cell.SetFuncResult nVar,sVar,ntype
end sub
.....

bb_hide_calc.jsp内空如下：
<%
String funcname = request.getParameter("funcname");
String bm = request.getParameter("bm");
String sfunc = request.getParameter("sfunc");
int nfunc = new Integer(sfunc).intValue();
com.bbgl.BbtjBean bb = new com.bbgl.BbtjBean();
String sVar = "";
double nVar = 0;
nVar = bb.getCalc(kmbm,nfunc,ztbh,rq);
%>

{
parent.ListFrame.setValue(<%=nVar%>,"<%=sVar%>",0)
}

....

0 0