Foxtable(狐表)用户栏目专家坐堂 → 自动计算选中数字的和的代码


  共有2907人关注过本帖树形打印复制链接

主题:自动计算选中数字的和的代码

帅哥哟,离线,有人找我吗?
JPG7
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:一尾狐 帖子:437 积分:3682 威望:0 精华:0 注册:2014/4/28 18:50:00
自动计算选中数字的和的代码  发帖心情 Post By:2015/9/6 21:25:00 [只看该作者]

窗口中想达到就跟
图片点击可在新窗口打开查看此主题相关图片如下:qq截图20150906212317.png
图片点击可在新窗口打开查看这个效果一样,结果显示在Lable里,代码怎么写

 回到顶部
帅哥哟,离线,有人找我吗?
大红袍
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2015/9/6 21:29:00 [只看该作者]

系统SystemIdle事件

 

If forms("窗口1").opened Then
    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) & " "
    Forms("窗口1").Controls("Label1").Text = Str1
End If


 回到顶部