Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
'公务员(参公)小计
Rs2.Cells(2,2).text = (Cdbl(Rs2.Cells(3,2).Text) + Cdbl(Rs2.Cells(4,2).Text) + Cdbl(Rs2.Cells(5,2).Text) + Cdbl(Rs2.Cells(6,2).Text) + Cdbl(Rs2.Cells(7,2).Text) + Cdbl(Rs2.Cells(8,2).Text) + Cdbl(Rs2.Cells(9,2).Text) + Cdbl(Rs2.Cells(10,2).Text) + Cdbl(Rs2.Cells(11,2).Text))
Rs2.Cells(2,3).text = (Cdbl(Rs2.Cells(3,3).Text) + Cdbl(Rs2.Cells(4,3).Text) + Cdbl(Rs2.Cells(5,3).Text) + Cdbl(Rs2.Cells(6,3).Text) + Cdbl(Rs2.Cells(7,3).Text) + Cdbl(Rs2.Cells(8,3).Text) + Cdbl(Rs2.Cells(9,3).Text) + Cdbl(Rs2.Cells(10,3).Text) + Cdbl(Rs2.Cells(11,3).Text))
Rs2.Cells(2,4).text = (Cdbl(Rs2.Cells(3,4).Text) + Cdbl(Rs2.Cells(4,4).Text) + Cdbl(Rs2.Cells(5,4).Text) + Cdbl(Rs2.Cells(6,4).Text) + Cdbl(Rs2.Cells(7,4).Text) + Cdbl(Rs2.Cells(8,4).Text) + Cdbl(Rs2.Cells(9,4).Text) + Cdbl(Rs2.Cells(10,4).Text) + Cdbl(Rs2.Cells(11,4).Text))
Rs2.Cells(2,5).text = (Cdbl(Rs2.Cells(3,5).Text) + Cdbl(Rs2.Cells(4,5).Text) + Cdbl(Rs2.Cells(5,5).Text) + Cdbl(Rs2.Cells(6,5).Text) + Cdbl(Rs2.Cells(7,5).Text) + Cdbl(Rs2.Cells(8,5).Text) + Cdbl(Rs2.Cells(9,5).Text) + Cdbl(Rs2.Cells(10,5).Text) + Cdbl(Rs2.Cells(11,5).Text))
Rs2.Cells(2,6).text = (Cdbl(Rs2.Cells(3,6).Text) + Cdbl(Rs2.Cells(4,6).Text) + Cdbl(Rs2.Cells(5,6).Text) + Cdbl(Rs2.Cells(6,6).Text) + Cdbl(Rs2.Cells(7,6).Text) + Cdbl(Rs2.Cells(8,6).Text) + Cdbl(Rs2.Cells(9,6).Text) + Cdbl(Rs2.Cells(10,6).Text) + Cdbl(Rs2.Cells(11,6).Text))
'工勤人员小计
Rs2.Cells(12,2).text = (Cdbl(Rs2.Cells(13,2).Text) + Cdbl(Rs2.Cells(14,2).Text) + Cdbl(Rs2.Cells(15,2).Text) + Cdbl(Rs2.Cells(16,2).Text) + Cdbl(Rs2.Cells(17,2).Text))
Rs2.Cells(12,3).text = (Cdbl(Rs2.Cells(13,3).Text) + Cdbl(Rs2.Cells(14,3).Text) + Cdbl(Rs2.Cells(15,3).Text) + Cdbl(Rs2.Cells(16,3).Text) + Cdbl(Rs2.Cells(17,3).Text))
Rs2.Cells(12,4).text = (Cdbl(Rs2.Cells(13,4).Text) + Cdbl(Rs2.Cells(14,4).Text) + Cdbl(Rs2.Cells(15,4).Text) + Cdbl(Rs2.Cells(16,4).Text) + Cdbl(Rs2.Cells(17,4).Text))
Rs2.Cells(12,5).text = (Cdbl(Rs2.Cells(13,5).Text) + Cdbl(Rs2.Cells(14,5).Text) + Cdbl(Rs2.Cells(15,5).Text) + Cdbl(Rs2.Cells(16,5).Text) + Cdbl(Rs2.Cells(17,5).Text))
Rs2.Cells(12,6).text = (Cdbl(Rs2.Cells(13,6).Text) + Cdbl(Rs2.Cells(14,6).Text) + Cdbl(Rs2.Cells(15,6).Text) + Cdbl(Rs2.Cells(16,6).Text) + Cdbl(Rs2.Cells(17,6).Text))
'公务员(参公)、工勤人员合计
Rs2.Cells(1,2).text = (Cdbl(Rs2.Cells(2,2).Text) + Cdbl(Rs2.Cells(12,2).Text))
Rs2.Cells(1,3).text = (Cdbl(Rs2.Cells(2,3).Text) + Cdbl(Rs2.Cells(12,3).Text))
Rs2.Cells(1,4).text = (Cdbl(Rs2.Cells(2,4).Text) + Cdbl(Rs2.Cells(12,4).Text))
Rs2.Cells(1,5).text = (Cdbl(Rs2.Cells(2,5).Text) + Cdbl(Rs2.Cells(12,5).Text))
Rs2.Cells(1,6).text = (Cdbl(Rs2.Cells(2,6).Text) + Cdbl(Rs2.Cells(12,6).Text))
Rs2.Cells(18,3).text = Rs2.Cells(1,6).text
下载信息 [文件大小: 下载次数: ] | |
点击浏览该文件:实例一.table |
提示的错误跟这段代码扯的上关系吗?
'...略
'...略
Dim Sum,Sum1 As Double '设置变量sum为双精度小数
'公务员(参公)
'厅局级正职
Sum = Tables("调标表").Compute("Sum(人数)", "享受地方津贴补贴职务级别 = '厅局级正职'")
Sum1 = Sum1 + Sum
if Sum > 0 Then
Rs2.Cells(3,2).Text = sum '设置表格内第4行第3个单元格填入文本
End If
'...略
'厅局级正职
Sum = Tables("调标表").Compute("Sum(人数)", "享受地方津贴补贴职务级别 = '厅局级副职'")
Sum1 = Sum1 + Sum
if Sum > 0 Then
Rs2.Cells(4,2).Text = sum '设置表格内第5行第3个单元格填入文本
End If
'...略
'县处级正职
Sum = Tables("调标表").Compute("Sum(人数)", "享受地方津贴补贴职务级别 = '县处级正职'")
Sum1 = Sum1 + Sum
if Sum > 0 Then
Rs2.Cells(5,2).Text = sum '设置表格内第6行第3个单元格填入文本
End If
'...略
'县处级副职
Sum = Tables("调标表").Compute("Sum(人数)", "享受地方津贴补贴职务级别 = '县处级副职'")
Sum1 = Sum1 + Sum
if Sum > 0 Then
Rs2.Cells(6,2).Text = sum '设置表格内第7行第3个单元格填入文本
End If
'...略
'乡科级正职
Sum = Tables("调标表").Compute("Sum(人数)", "享受地方津贴补贴职务级别 = '乡科级正职'")
Sum1 = Sum1 + Sum
if Sum > 0 Then
Rs2.Cells(7,2).Text = sum '设置表格内第8行第3个单元格填入文本
End If
'...略
'乡科级副职
Sum = Tables("调标表").Compute("Sum(人数)", "享受地方津贴补贴职务级别 = '乡科级副职'")
Sum1 = Sum1 + Sum
if Sum > 0 Then
Rs2.Cells(8,2).Text = sum '设置表格内第9行第3个单元格填入文本
End If
'...略
'股长
Sum = Tables("调标表").Compute("Sum(人数)", "享受地方津贴补贴职务级别 = '股长'")
Sum1 = Sum1 + Sum
if Sum > 0 Then
Rs2.Cells(9,2).Text = sum '设置表格内第10行第3个单元格填入文本
End If
'...略
'科员
Sum = Tables("调标表").Compute("Sum(人数)", "享受地方津贴补贴职务级别 = '科员'")
Sum1 = Sum1 + Sum
if Sum > 0 Then
Rs2.Cells(10,2).Text = sum '设置表格内第11行第3个单元格填入文本
End If
'...略
'办事员
Sum = Tables("调标表").Compute("Sum(人数)", "享受地方津贴补贴职务级别 = '办事员'")
Sum1 = Sum1 + Sum
if Sum > 0 Then
Rs2.Cells(11,2).Text = sum '设置表格内第12行第3个单元格填入文本
End If
'...略
'公务员(参公)小计
Rs2.Cells(2,2).text = Sum1
'...略