第一:
If pr IsNot Nothing And "结关" = 1 Then
改为:
If pr IsNot Nothing And pr("结关") = 1 Then
第二:
ElseIf pr IsNot Nothing And "取消" = 1 Then
ElseIf pr IsNot Nothing And pr("取消") = 1 Then