Dim d1 As Double
Dim d2 As Double
Dim d3 As Double
Dim d4 As Double
Dim d5 As Double
d1=1
d2=1
d3=1
d4=1
Select Case e.DataCol.Name
Case "第一列"
If e.DataRow.IsNull("第一列") Then
e.DataRow("第一列") = Nothing
Else
d1=e.DataRow("第一列")
d5=d1*d2*d3*d4
e.DataRow("第五列")=d5
End If
Case "第二列"
If e.DataRow.IsNull("第二列") Then
e.DataRow("第二列") = Nothing
Else
d2=e.DataRow("第二列")
d5=d1*d2*d3*d4
e.DataRow("第五列")=d5
End If
Case "第三列"
If e.DataRow.IsNull("第三列") Then
e.DataRow("第三列") = Nothing
Else
d3=e.DataRow("第三列")
d5=d1*d2*d3*d4
e.DataRow("第五列")=d5
End If
Case "第四列"
If e.DataRow.IsNull("第四列") Then
e.DataRow("第四列") = Nothing
Else
d4=e.DataRow("第四列")
d5=d1*d2*d3*d4
e.DataRow("第五列")=d5
End If
End Select