Foxtable(狐表)用户栏目专家坐堂 → [求助]状态栏当前表选择区域合计问题怎么解决


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

主题:[求助]状态栏当前表选择区域合计问题怎么解决

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


加好友 发短信
等级:版主 帖子:5246 积分:33163 威望:0 精华:8 注册:2013/1/17 21:28:00
  发帖心情 Post By:2014/1/27 11:25:00 [显示全部帖子]

'''
StatusBar.Message1 = ""
Dim s As String
Dim sum As Double
If CurrentTable IsNot Nothing Then
    If e.Table.RowSel < 0 OrElse e.Table.ColSel < 0 Then
        Return
    End If
    For Each c As Col In CurrentTable.Cols
        sum = 0
        If c.IsNumeric Then
            For i As Integer = e.NewRange.TopRow To e.NewRange.BottomRow
                sum + = CurrentTable.Rows(i)(c.Name)
            Next
            s + = c.Name & "  " & sum & "  "
        End If
    Next
    StatusBar.Message1 =  "当前区域合计:" & "  总行数  " & e.NewRange.BottomRow - e.NewRange.TopRow + 1 & "  " & s
Else
    StatusBar. Reset()
End If

 回到顶部