'多条件-
If e.DataCol.Name="实际值" Then '如果
'如果"
If e.NewValue Is Nothing Then
e.DataRow("得分")= Nothing
'如果"
ElseIf e.NewValue> Z值 Then
e.DataRow("得分")=120+[(120-100)÷(Z值-D值)×(实际值-Z值)×2]
'如果"
ElseIf e.NewValue= Z值 Then
e.DataRow("得分")=120
ElseIf e.NewValue < Z值 Or e.NewValue > D值 Then
e.DataRow("得分")=100+[(120-100)÷(Z值-D值)×(实际值-Z值)]
'如果"
ElseIf e.NewValue = D值 Then
e.DataRow("得分")=100
''否则,
Else
e.DataRow("得分")=100-[(120-100)÷(Z值-D值)×(实际值-Z值)×2]
End If
End If
上面代码报错,提示“未声明Z值 ”,ElseIf e.NewValue> Z值 Then