以下是引用发财在2014-5-29 10:06:00的发言:
出现错误:Index 51 is either negative or above rows count.
呃,基本的代码都写错?
Tables("资产负债表汇总").StopRedraw()
Dim r1 As Table = Tables("主营资产负债表")
Dim r2 As Table = Tables("自营资产负债表")
Dim r As Table = Tables("资产负债表汇总")
For n As Integer = 0 To 50
r.Rows(n)("年初数") = r1.Rows(n)("年初数") + r2.Rows(n)("年初数")
r.Rows(n)("年未数") = r1.Rows(n)("年未数") + r2.Rows(n)("年未数")
r.Rows(n)("年初数2") = r1.Rows(n)("年初数2") + r2.Rows(n)("年初数2")
r.Rows(n)("年未数2") = r1.Rows(n)("年未数2") + r2.Rows(n)("年未数2")
Next
Tables("资产负债表汇总").ResumeRedraw()