表A的 AfterSelRangeChange代码改为:
If Forms("xx窗口").opened Then
Dim it1 As Winform.StripItem = Forms("xx窗口").Strips("状态栏").Items("Stat")
Dim t As Table = e.Table
it1.Text = ""
it1.Text = "合计: " & t.Aggregate(AggregateEnum.Sum,t.TopRow,t.leftCol,t.BottomRow,t.rightCol) & " 计数: " & t.Aggregate(AggregateEnum.Count,t.TopRow,t.leftCol,t.BottomRow,t.rightCol) & " 平均: " & t.Aggregate(AggregateEnum.average,t.TopRow,t.leftCol,t.BottomRow,t.rightCol)
End If