以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  自动计算的代码  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=146125)

--  作者:mxl810823
--  发布时间:2020/2/17 0:11:00
--  自动计算的代码
我自定义了菜单栏,然后选择数据自动计算结果显示在右下角的功能没有了,如下图

图片点击可在新窗口打开查看此主题相关图片如下:qq图片20200216235534.png
图片点击可在新窗口打开查看
但是我还想在自定义了菜单栏后保留这个功能,那么代码是什么,如何实现呢?


--  作者:y2287958
--  发布时间:2020/2/17 8:51:00
--  
Dim str1 As String = ""
Dim t As Table = CurrentTable
Str1 = Str1 & "计数:" & t.Aggregate(AggregateEnum.Count, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "累计:" & t.Aggregate(AggregateEnum.Sum, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "平均:" & t.Aggregate(AggregateEnum.Average, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "最大:" & t.Aggregate(AggregateEnum.Max, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "最小:" & t.Aggregate(AggregateEnum.Min, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "标准差:" & t.Aggregate(AggregateEnum.Std, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "总体标准差:" & t.Aggregate(AggregateEnum.StdPop, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "方差:" & t.Aggregate(AggregateEnum.Var, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "
Str1 = Str1 & "总体方差:" & t.Aggregate(AggregateEnum.VarPop, t.TopRow, t.LeftCol, t.BottomRow, t.RightCol) & " "

--  作者:nmamtf
--  发布时间:2020/12/4 18:05:00
--  
也帮到我了,衷心感谢!
--  作者:白国栋
--  发布时间:2021/1/2 10:45:00
--  
这个指令是放到系统事件的systemidle里吗?


--  作者:有点蓝
--  发布时间:2021/1/3 10:47:00
--  
一般放到systemidle